<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Windows on Blog - uTIcARdI</title><link>https://blog.gainskills.top/tags/windows/</link><description>Recent content in Windows on Blog - uTIcARdI</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 04 Aug 2025 18:51:32 +1200</lastBuildDate><atom:link href="https://blog.gainskills.top/tags/windows/index.xml" rel="self" type="application/rss+xml"/><item><title>os.path.join() or os.sep.join()?</title><link>https://blog.gainskills.top/2019/07/23/path-join/</link><pubDate>Tue, 23 Jul 2019 00:00:00 +0000</pubDate><guid>https://blog.gainskills.top/2019/07/23/path-join/</guid><description>&lt;p&gt;There are two functions join a full path. E.g.: In drive: C:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;|- test
| |- test.xt
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;os.path.join&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;import&lt;/span&gt; os
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fullpath &lt;span style="color:#f92672"&gt;=&lt;/span&gt; os&lt;span style="color:#f92672"&gt;.&lt;/span&gt;path&lt;span style="color:#f92672"&gt;.&lt;/span&gt;join(&lt;span style="color:#e6db74"&gt;&amp;#39;c:&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;test&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;test.txt&amp;#39;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output on windows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;c:test\test&lt;span style="color:#f92672"&gt;.&lt;/span&gt;txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output on Mac OS
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;c:&lt;span style="color:#f92672"&gt;/&lt;/span&gt;test&lt;span style="color:#f92672"&gt;/&lt;/span&gt;test&lt;span style="color:#f92672"&gt;.&lt;/span&gt;txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;os.sep.join&lt;/code&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;import&lt;/span&gt; os
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fullpath &lt;span style="color:#f92672"&gt;=&lt;/span&gt; os&lt;span style="color:#f92672"&gt;.&lt;/span&gt;sep&lt;span style="color:#f92672"&gt;.&lt;/span&gt;join([&lt;span style="color:#e6db74"&gt;&amp;#39;c:&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;test&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;test.txt&amp;#39;&lt;/span&gt;])&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output on windows:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;c:\test\test&lt;span style="color:#f92672"&gt;.&lt;/span&gt;txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Output on Mac OS
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;c:&lt;span style="color:#f92672"&gt;/&lt;/span&gt;test&lt;span style="color:#f92672"&gt;/&lt;/span&gt;test&lt;span style="color:#f92672"&gt;.&lt;/span&gt;txt&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From the outputs, you can see the difference: &lt;code&gt;os.path.join()&lt;/code&gt; doesn&amp;rsquo;t work as expected on windows.&lt;/p&gt;
&lt;p&gt;Further verification:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;with&lt;/span&gt; open(fullpath) &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; test:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; test&lt;span style="color:#f92672"&gt;.&lt;/span&gt;read()&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Run with error:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-Python" data-lang="Python"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;with&lt;/span&gt; open(fullpath) &lt;span style="color:#66d9ef"&gt;as&lt;/span&gt; test:
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;FileNotFoundError&lt;/span&gt;: [Errno &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;] No such file &lt;span style="color:#f92672"&gt;or&lt;/span&gt; directory: &lt;span style="color:#e6db74"&gt;&amp;#39;c:test&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;\\&lt;/span&gt;&lt;span style="color:#e6db74"&gt;test.txt&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</description></item><item><title>File name on windows</title><link>https://blog.gainskills.top/2019/03/01/file-name-on-winos/</link><pubDate>Fri, 01 Mar 2019 00:00:00 +0000</pubDate><guid>https://blog.gainskills.top/2019/03/01/file-name-on-winos/</guid><description>&lt;h3 id="error-1"&gt;Error 1&lt;/h3&gt;
&lt;p&gt;Run a bat (ping.bat) to ping multiple IPs like this:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bat" data-lang="bat"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; testipa=x.x.x.x
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;echo&lt;/span&gt; Checking ping %testipa% (15 times), please don&amp;#39;t close current window
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;echo&lt;/span&gt; ping %testipa% (15 times) &amp;gt;&amp;gt; test.log
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ping %testipa% -w 500 -n 15 &amp;gt;&amp;gt; test.log&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;But got the following error:
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"&gt;&lt;code class="language-bat" data-lang="bat"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Checking ping x.x.x.x (15 times), please don&amp;#39;t close current window
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;The process cannot access the file because it is being used by another process.
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;The process cannot access the file because it is being used by another process.&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</description></item><item><title>Monitor network connections based on Process</title><link>https://blog.gainskills.top/2018/09/21/monitor-network-connections-based-on-process/</link><pubDate>Fri, 21 Sep 2018 00:00:00 +0000</pubDate><guid>https://blog.gainskills.top/2018/09/21/monitor-network-connections-based-on-process/</guid><description>&lt;p&gt;&lt;a href="https://www.wireshark.org/"&gt;Wireshark&lt;/a&gt; is widely used in packets capturing with flexible filters, but for some particular cases, end users care about the network sessions which established by a specific application.&lt;/p&gt;
&lt;p&gt;I will show how to check the sessions of ‘Microsoft OneNote’.&lt;/p&gt;
&lt;h3 id="windows"&gt;Windows&lt;/h3&gt;
&lt;p&gt;Microsoft provides its own product for packets capturing: &lt;a href="https://www.microsoft.com/en-us/download/4865"&gt;Microsoft Network Monitor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Lunch ‘Microsoft Network Monitor’ before you run OneNote:&lt;/p&gt;

















&lt;div align="center"&gt;
 &lt;figure style="padding: 0.8rem; margin: 2rem 0; border: thin #c0c0c0 solid; border-radius: 10px; width: 430px; max-width: 88%; "&gt;
 &lt;a href="https://blog.gainskills.top/img/postimgs/2018/09/12-opt_hu_e0c726d9724957f7.png" data-fancybox data-caption=nm-1 &gt;
 &lt;img data-src="https://blog.gainskills.top/img/postimgs/2018/09/12-opt_hu_adb9115e9eadc7bf.png" class="img-responsive img-lazyload" alt=nm-1 style="height: 300px;"/&gt;
 &lt;/a&gt;
 &lt;figcaption class="text-capitalize"&gt;
 &lt;small&gt;nm-1&lt;/small&gt;
 &lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/div&gt;

&lt;p&gt;You will see the processes from the left panel, All related network sessions will shown in the ‘frame summary’ window once OneNote lunched:&lt;/p&gt;</description></item><item><title>Run Ansible on Windows</title><link>https://blog.gainskills.top/2016/11/30/run-ansible-on-windows/</link><pubDate>Tue, 29 Nov 2016 00:00:00 +0000</pubDate><guid>https://blog.gainskills.top/2016/11/30/run-ansible-on-windows/</guid><description>&lt;p&gt;Background:&lt;/p&gt;
&lt;p&gt;Here is a topology about the environment for performance testing, let’s name the servers 1st:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1 windows server as the License/Workspace server&lt;/li&gt;
&lt;li&gt;5 windows servers as the Network Server&lt;/li&gt;
&lt;li&gt;5 windows servers as the Automation server&lt;/li&gt;
&lt;/ul&gt;















&lt;div align="center"&gt;
 &lt;figure style="padding: 0.8rem; margin: 2rem 0; border: thin #c0c0c0 solid; border-radius: 10px; width: 476px; max-width: 88%; "&gt;
 &lt;a href="https://blog.gainskills.top/img/postimgs/2016/11/5-opt_hu_fb9d39317589d7fd.png" data-fancybox data-caption=Topo &gt;
 &lt;img data-src="https://blog.gainskills.top/img/postimgs/2016/11/5-opt_hu_7bb2a51c31b7b3fe.png" class="img-responsive img-lazyload" alt=Topo style="height: 300px;"/&gt;
 &lt;/a&gt;
 &lt;figcaption class="text-capitalize"&gt;
 &lt;small&gt;Topo&lt;/small&gt;
 &lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/div&gt;

&lt;p&gt;It took us a lot of time to deploy the product and collect logs on all of these servers.&lt;/p&gt;</description></item><item><title>VSphere6, VCenter6 Installation</title><link>https://blog.gainskills.top/2016/01/08/vsphere6-vcenter6-installation/</link><pubDate>Fri, 08 Jan 2016 00:00:00 +0000</pubDate><guid>https://blog.gainskills.top/2016/01/08/vsphere6-vcenter6-installation/</guid><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Crash happened when I install Vsphere on my PC&lt;/p&gt;
&lt;p&gt;Solution: Disable option &amp;ldquo;Limit Maximum CPUID&amp;rdquo; in Bios&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;VCenter appliance deployment&lt;/p&gt;
&lt;p&gt;Vmware doesn&amp;rsquo;t provide vcenter appliance in ova/ovf format anymore, follow the &lt;a href="http://www.vladan.fr/vmware-vcenter-6-0-u1-vcsa-how-to-install-configure/"&gt;instruction&lt;/a&gt; to deploy it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Inventory is empty in the VCenter webpage&lt;/p&gt;
&lt;p&gt;The most important thing: Don&amp;rsquo;t login vcenter by the account &amp;lsquo;root&amp;rsquo;, instead of it using SSO account. the account in the format: &amp;lsquo;administrator@domain-name&amp;rsquo;&lt;/p&gt;
&lt;p&gt;Also, Vmware has a KB about this issue:&lt;/p&gt;</description></item><item><title>SNMP simulator installation guide</title><link>https://blog.gainskills.top/2016/01/28/snmp-simulator-installation-guide/</link><pubDate>Wed, 13 Nov 2013 00:00:00 +0000</pubDate><guid>https://blog.gainskills.top/2016/01/28/snmp-simulator-installation-guide/</guid><description>&lt;p&gt;&lt;strong&gt;About SNMP Simulator&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The the SNMP Simulator software is intended for testing SNMP Managers against a large number of SNMP Agents that represent a potentially very large network populated with different kinds of SNMP-capable devices.&lt;/p&gt;
&lt;p&gt;Refers to its &lt;a href="https://github.com/etingof/snmpsim"&gt;project page&lt;/a&gt; for more info.&lt;/p&gt;
&lt;p&gt;Why?&lt;/p&gt;
&lt;p&gt;With SNMP simulator you can simulate a device by the output of SNMPwalk without considering MIB files.&lt;/p&gt;
&lt;p&gt;This article is about how to install SNMP Simulator.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install Python&lt;/p&gt;</description></item></channel></rss>