<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Lockdown Windows 2003 &amp; XP with Simple Scripts</title>
	<atom:link href="http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/</link>
	<description>Notes from the edge</description>
	<lastBuildDate>Mon, 06 Sep 2010 03:17:23 -0400</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: bill</title>
		<link>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/comment-page-1/#comment-133295</link>
		<dc:creator>bill</dc:creator>
		<pubDate>Wed, 09 Jun 2010 17:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/#comment-133295</guid>
		<description>Kris,

SC will execute against remote hosts via a secure RPC call. It will pass whatever credentials are used to run it, so if you are a domain admin, it will execute on the remote host with your creds. In the script, I am using nested loops

for /f %%a in (hosts.txt) do call :serviceconfig %%a
goto :eom
:serviceconfig
for /f %%b in (services.txt) do (sc \\%1 config %%b start= disabled)

The first loop passes the variable %%a to the call to :serviceconfig.  :serviceconfig receives that variable and shoves it into the variable %1. If you passed it 2 variables, the first would be %1 and the second would be %2. The value of %%a is read from a file hosts.txt, which is just a list of fully qualified domain names for the target machines. When the sub-routine :serviceconfig completes, it returns back to the 1st loop and we read the second value in hosts.txt and repeat the process.

I hope this helps.

-B</description>
		<content:encoded><![CDATA[<p>Kris,</p>
<p>SC will execute against remote hosts via a secure RPC call. It will pass whatever credentials are used to run it, so if you are a domain admin, it will execute on the remote host with your creds. In the script, I am using nested loops</p>
<p>for /f %%a in (hosts.txt) do call :serviceconfig %%a<br />
goto :eom<br />
:serviceconfig<br />
for /f %%b in (services.txt) do (sc \\%1 config %%b start= disabled)</p>
<p>The first loop passes the variable %%a to the call to :serviceconfig.  :serviceconfig receives that variable and shoves it into the variable %1. If you passed it 2 variables, the first would be %1 and the second would be %2. The value of %%a is read from a file hosts.txt, which is just a list of fully qualified domain names for the target machines. When the sub-routine :serviceconfig completes, it returns back to the 1st loop and we read the second value in hosts.txt and repeat the process.</p>
<p>I hope this helps.</p>
<p>-B</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kris</title>
		<link>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/comment-page-1/#comment-133291</link>
		<dc:creator>Kris</dc:creator>
		<pubDate>Wed, 09 Jun 2010 13:08:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/#comment-133291</guid>
		<description>Thanks for the script Bill.  I don&#039;t have a lot of experience with this, therefore I don&#039;t understand how this can be executed on remote servers. Don&#039;t I need something like psexec?  And to specify the remote host, you use \\%1,  but where does this variable come from?  I hope you have a minute to help me out here.
Many thanks in advance!</description>
		<content:encoded><![CDATA[<p>Thanks for the script Bill.  I don&#8217;t have a lot of experience with this, therefore I don&#8217;t understand how this can be executed on remote servers. Don&#8217;t I need something like psexec?  And to specify the remote host, you use \\%1,  but where does this variable come from?  I hope you have a minute to help me out here.<br />
Many thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stan</title>
		<link>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/comment-page-1/#comment-118423</link>
		<dc:creator>Stan</dc:creator>
		<pubDate>Mon, 08 Feb 2010 11:35:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/#comment-118423</guid>
		<description>Thanks! Very usefull article. I&#039;m going to add modifications to suite my needs and post it on my blog =&gt; http://blog.omotech.com</description>
		<content:encoded><![CDATA[<p>Thanks! Very usefull article. I&#8217;m going to add modifications to suite my needs and post it on my blog =&gt; <a href="http://blog.omotech.com" rel="nofollow">http://blog.omotech.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Inyou Crash</title>
		<link>http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/comment-page-1/#comment-7751</link>
		<dc:creator>Inyou Crash</dc:creator>
		<pubDate>Thu, 12 Apr 2007 13:56:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.edgeblog.net/2007/lockdown-windows-2003-xp-with-simple-scripts/#comment-7751</guid>
		<description>Thanks for the Tips.  I plan on using modified versions of this script.  

Windows Media Player 11 has a particularly nasty little service that seems to devour resources.  wmpnetwk.exe is the little bugger, and now with my new script, I have pushed this out to the network and hope to utilize netware for distribution.</description>
		<content:encoded><![CDATA[<p>Thanks for the Tips.  I plan on using modified versions of this script.  </p>
<p>Windows Media Player 11 has a particularly nasty little service that seems to devour resources.  wmpnetwk.exe is the little bugger, and now with my new script, I have pushed this out to the network and hope to utilize netware for distribution.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.322 seconds -->
