<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>cyborgworkshop.org &#187; Windows</title>
	<atom:link href="http://cyborgworkshop.org/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://cyborgworkshop.org</link>
	<description>Blurring the line</description>
	<lastBuildDate>Wed, 25 Aug 2010 16:53:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Get the PID of an application pool in iis 6.0</title>
		<link>http://cyborgworkshop.org/2010/08/25/get-the-pid-of-an-application-pool-in-iis-6-0/</link>
		<comments>http://cyborgworkshop.org/2010/08/25/get-the-pid-of-an-application-pool-in-iis-6-0/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 16:52:49 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Best Tools]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=641</guid>
		<description><![CDATA[All of the IIS process&#8217;s show up as the same process name, which makes it really challenging to figure out which of your websites has lost it&#8217;s mind.  In order to trace an IIS website or application pool back to a PID, you just need to open a command prompt and run the iisapp utility. [...]]]></description>
			<content:encoded><![CDATA[<p>All of the IIS process&#8217;s show up as the same process name, which makes it really challenging to figure out which of your websites has lost it&#8217;s mind.  In order to trace an IIS website or application pool back to a PID, you just need to open a command prompt and run the iisapp utility.<br />
<code><br />
iisapp<br />
</code><br />
Outputs<br />
W3WP.exe PID: 7424   AppPoolId: Site1<br />
W3WP.exe PID: 8096   AppPoolId: JoesSite<br />
W3WP.exe PID: 13080   AppPoolId: Wookielove.com</p>
<p>And now you can just use taskmanager to track resource usage to a site. </p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2010/08/25/get-the-pid-of-an-application-pool-in-iis-6-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a windows hostname from an IP using netbios</title>
		<link>http://cyborgworkshop.org/2010/07/23/get-a-windows-hostname-from-an-ip-using-netbios/</link>
		<comments>http://cyborgworkshop.org/2010/07/23/get-a-windows-hostname-from-an-ip-using-netbios/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 13:35:15 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=627</guid>
		<description><![CDATA[I&#8217;ve run into a situation a couple of times now where DNS hasn&#8217;t been setup correctly and I have no idea what hostname an IP resolves to. For better or worse, windows has the netbios system that keeps it&#8217;s own naming services and can be queried from the command line using nbtstat. nbtstat -A XXX.XXX.XXX.XXX [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve run into a situation a couple of times now where DNS hasn&#8217;t been setup correctly and I have no idea what hostname an IP resolves to.  For better or worse, windows has the netbios system that keeps it&#8217;s own naming services and can be queried from the command line using nbtstat.<br />
<code><br />
nbtstat -A XXX.XXX.XXX.XXX<br />
</code><br />
Where XXX is the IP address that you are trying to resolve. </p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2010/07/23/get-a-windows-hostname-from-an-ip-using-netbios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automate setting up a windows PC onto a wireless network</title>
		<link>http://cyborgworkshop.org/2009/07/30/automate-setting-up-a-windows-pc-onto-a-wireless-network/</link>
		<comments>http://cyborgworkshop.org/2009/07/30/automate-setting-up-a-windows-pc-onto-a-wireless-network/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 21:07:18 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Best Tools]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=492</guid>
		<description><![CDATA[I have to setup a couple of hundred laptops carried by sales folks in the field to connect to a new WPA2-PSK network for work.  Fortunately, windows XP has a nice little utility that lets you automate creating a new wireless connection. You&#8217;ll need a USB thumbdrive for a little bit to make this work, [...]]]></description>
			<content:encoded><![CDATA[<p>I have to setup a couple of hundred laptops carried by sales folks in the field to connect to a new WPA2-PSK network for work.  Fortunately, windows XP has a nice little utility that lets you automate creating a new wireless connection. You&#8217;ll need a USB thumbdrive for a little bit to make this work, but you won&#8217;t need to distribute it.</p>
<ul>
<li> In Control Panel, Run the Wireless Network Setup Wizard and enter in all of your network specifics.</li>
<li>When prompted, choose the&#8221;Use a USB flash drive&#8221; Method. Make sure you have a flash drive plugged into your computer.</li>
<li>Pick the drive letter and hit next,  once it has copied the files over, you can just hit cancel and exit out of the wizard.</li>
</ul>
<p>On your thumbdrive you now have two files (setupsnk.exe and AUTORUN.inf) as well as a directory (SMRTNTKY) with various files in it. If you wanted to, you could distribute this thumbdrive as is and just have people click on the setupsnk.exe to configure their machines. I need to email these settings out, so I did this instead.</p>
<ul>
<li>Create  a folder, C:\Wireless</li>
<li>copy  those two files and the entire folder into C:\Wireless</li>
<li>create a batch file called &#8220;Install_Wireless.bat&#8221; and place it into C:\Wireless</li>
<li>put the following in that batch file</li>
</ul>
<blockquote><p>SET CUR_DIR=%cd%<br />
subst z: &#8220;%CUR_DIR%&#8221;<br />
chdir /D Z:<br />
Z:\setupsnk.exe<br />
sleep 60<br />
subst /D Z:</p></blockquote>
<p>The batch file just creates a temp drive (z) that points to <span style="text-decoration: line-through;">C:\wireless,</span> the current executing bat files directory, changes to that drive and runs the setup. setupsnk assumes that it is being run directly from a drive letter, hence the mapping.  We wait for 60 seconds after the run and then remove the drive mapping assuming that you were able to click the ok button twice in 60 seconds (the whole process takes like 2 seconds).</p>
<p>Now, just zip that all up and distribute it.  <span style="text-decoration: line-through;">The key piece is that everything gets extracted to C:\wireless.   I tried the old <a href="http://cyborgworkshop.org/2009/07/08/using-relative-paths-in-batch-files/">Relative paths in batch files</a> trick, but it didn&#8217;t work for whatever reason and I&#8217;m in a bit of a hurry on this one.  If anyone can get that part working, you would be teh awesome. </span>I get to claim that awesome sauce.   %~dp0 wasn&#8217;t working for whatever reason, but %CD% does, so I&#8217;ll take it.</p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2009/07/30/automate-setting-up-a-windows-pc-onto-a-wireless-network/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Authenticating a RHEL based linux box against Active Directory</title>
		<link>http://cyborgworkshop.org/2009/07/29/authenticating-a-rhel-based-linux-box-against-a-ad/</link>
		<comments>http://cyborgworkshop.org/2009/07/29/authenticating-a-rhel-based-linux-box-against-a-ad/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 14:00:57 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=469</guid>
		<description><![CDATA[Unix has been able to authenticate against a central server for a long, long time using LDAP and various other technologies, but Microsoft&#8217;s Active Directory is the authentication scheme you are most likely to come across in the enterprise.  Using RHEL (well, centos) it&#8217;s an easy setup. From a command line box, run authconfig-tui Select [...]]]></description>
			<content:encoded><![CDATA[<p>Unix has been able to authenticate against a central server for a long, long time using LDAP and various other technologies, but Microsoft&#8217;s Active Directory is the authentication scheme you are most likely to come across in the enterprise.  Using RHEL (well, centos) it&#8217;s an easy setup.</p>
<p>From a command line box, run</p>
<blockquote><p>authconfig-tui</p></blockquote>
<p>Select &#8220;Use Winbind&#8221; under User Information and &#8220;Use Winbind for Authentication&#8221; under Authentication. I also select &#8220;Local authorization is sufficient&#8221; which we could argue for a long, long time about.  That one is up to you.<br />
When you click next, you&#8217;ll need to fill in the blanks with your organizations specific information.  You do want to use &#8220;ads&#8221; as your security model if you are on active directory and put a wildcard (*) in the Domain Controllers field.  Next hit Join Domain and enter the credentials for an account that has the rights to join this machine to the domain.   Next we need to tweak a few files.<br />
in /etc/samba/smb.conf change</p>
<blockquote><p>&#8220;winbind use default domain=no&#8221; to &#8220;winbind use default domain=&#8221;yes&#8221;</p></blockquote>
<p>If you don&#8217;t, you will need to enter your domain every time you log a user into the system like AD/User instead of just logging in as User.<br />
Add</p>
<blockquote><p>idmap backend = rid</p></blockquote>
<p>into the authconfig section, right under the &#8220;idmap gid =&#8221; line.  This sets up user and group id mappings to use the AD RID. You want this as long as only one domain will be logging into this server. If users from several AD domains will be logging in, you need to hit google.<br />
In /etc/pam.d/system-auth, add</p>
<blockquote><p>session required pam_mkhomedir.so skel=/etc/skel umask=0077</p></blockquote>
<p>To the very end of the file.  This creates a home directory for each user when they log into the system if they don&#8217;t have one already.<br />
Now just issue a</p>
<blockquote><p>service winbind restart</p></blockquote>
<p>and you should be on your way!</p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2009/07/29/authenticating-a-rhel-based-linux-box-against-a-ad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using relative paths in batch files</title>
		<link>http://cyborgworkshop.org/2009/07/08/using-relative-paths-in-batch-files/</link>
		<comments>http://cyborgworkshop.org/2009/07/08/using-relative-paths-in-batch-files/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 18:23:56 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=452</guid>
		<description><![CDATA[I nabbed this one from Lifehacker.   Instead of having to hard code paths in batch scripts you can use the variable %~dp0 to signify the working directory of the script itself.   Now, I usually try not to be a zealot and bash on windows much especially since I started working at a computers that is [...]]]></description>
			<content:encoded><![CDATA[<p>I nabbed this one from <a href="http://feeds.gawker.com/~r/lifehacker/full/~3/tHqmMSmCSvQ/use-relative-paths-in-your-batch-files">Lifehacker</a>.   Instead of having to hard code paths in batch scripts you can use the variable %~dp0 to signify the working directory of the script itself.   Now, I usually try not to be a zealot and bash on windows much especially since I started working at a computers that is very windows centric,  but damn man!  One of windows greatest weaknesses is lack of a really good command line and &#8216;%~dp0&#8242; is a perfect example of that.  Though I will be using that variable in scripts to come <img src='http://cyborgworkshop.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<blockquote><p>If you use &#8220;%~dp0&#8243; (sans quotes) in a batch file, this will point to the batch file&#8217;s path. For example :</p>
<p>SET MAC=00:00:00:00:00:00<br />
%~dp0mc-wol.exe %MAC%</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2009/07/08/using-relative-paths-in-batch-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
