<?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/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
		>
<channel>
	<title>Comments on: How To Create A Windows Batch File To Map Multiple Drives At Once</title>
	<atom:link href="http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html</link>
	<description>Computer - Internet - Technology Tips And Tutorials</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:38:51 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Roy</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-26817</link>
		<dc:creator>Roy</dc:creator>
		<pubDate>Fri, 16 Jul 2010 15:51:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-26817</guid>
		<description>As already noted, hard coded passwords are a bad idea.
A script can prompt the user for a password and hide what is entered.

I didn&#039;t invent this method. I&#039;ve copied the relevant text from the link below.

From http://www.novell.com/communities/node/3124/using-ldap-fun-and-profit

Some batch file scripters add this little piece of code in their scripts:

:: Prompt for username and prompt for password using assembler code
@echo off
echo Enter the authorized LDAP username and password ... 
set /p authuser=Enter admin LDAP name: 
echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5x&gt;in.com
set /p passwd=Enter password:in.com&quot; 

actually writes a little scrap of assembler code into an executable file in the current directory called &quot;in.com&quot;. The following commands use it to capture the next keyboard input (the password) into the &quot;passwd&quot; variable without printing any characters to the screen. Then it deletes the scrap of code (del in.com) to tidy up.</description>
		<content:encoded><![CDATA[<p>As already noted, hard coded passwords are a bad idea.<br />
A script can prompt the user for a password and hide what is entered.</p>
<p>I didn&#039;t invent this method. I&#039;ve copied the relevant text from the link below.</p>
<p>From <a href="http://www.novell.com/communities/node/3124/using-ldap-fun-and-profit" rel="nofollow">http://www.novell.com/communities/node/3124/using-ldap-fun-and-profit</a></p>
<p>Some batch file scripters add this little piece of code in their scripts:</p>
<p>:: Prompt for username and prompt for password using assembler code<br />
@echo off<br />
echo Enter the authorized LDAP username and password &#8230;<br />
set /p authuser=Enter admin LDAP name:<br />
echo hP1X500P[PZBBBfh#b##fXf-V@`$fPf]f3/f1/5++u5x&gt;in.com<br />
set /p passwd=Enter password:in.com&#034; </p>
<p>actually writes a little scrap of assembler code into an executable file in the current directory called &#034;in.com&#034;. The following commands use it to capture the next keyboard input (the password) into the &#034;passwd&#034; variable without printing any characters to the screen. Then it deletes the scrap of code (del in.com) to tidy up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: k0k0pelli</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-25767</link>
		<dc:creator>k0k0pelli</dc:creator>
		<pubDate>Fri, 18 Jun 2010 13:17:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-25767</guid>
		<description>@&lt;a href=&quot;#comment-24911&quot; rel=&quot;nofollow&quot;&gt;Mo&lt;/a&gt;: 


Interestingly enough, the roll out is all finished, and my answer turned out to be stupid syntax changes.  The actual batch file looks like this, and worked perfectly!

echo enter &quot;old machine name&quot;
set /p &quot;computername=&quot; 
echo 
net use z: &quot;\\%computername%\c$&quot; /user:%computername%\username password
net use z: 
net use y: &quot;\\%computername%\d$&quot; /user:%computername%\username password
net use y: 

In the example above, replace the word &quot;username&quot; with yours, or administrator, or whoever has rights.  and the word &quot;password&quot; is also replaced to be the password corresponding to the username replaced.  It was great how it worked, because from there, I had batch files created that used the mapping letters to copy data from z:, and from y:, to the correct locations on the new machine&#039;s C: and D: drives.

It works.</description>
		<content:encoded><![CDATA[<p>@<a href="#comment-24911" rel="nofollow">Mo</a>: </p>
<p>Interestingly enough, the roll out is all finished, and my answer turned out to be stupid syntax changes.  The actual batch file looks like this, and worked perfectly!</p>
<p>echo enter &#034;old machine name&#034;<br />
set /p &#034;computername=&#034;<br />
echo<br />
net use z: &#034;\\%computername%\c$&#034; /user:%computername%\username password<br />
net use z:<br />
net use y: &#034;\\%computername%\d$&#034; /user:%computername%\username password<br />
net use y: </p>
<p>In the example above, replace the word &#034;username&#034; with yours, or administrator, or whoever has rights.  and the word &#034;password&#034; is also replaced to be the password corresponding to the username replaced.  It was great how it worked, because from there, I had batch files created that used the mapping letters to copy data from z:, and from y:, to the correct locations on the new machine&#039;s C: and D: drives.</p>
<p>It works.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dominique</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-25760</link>
		<dc:creator>dominique</dc:creator>
		<pubDate>Fri, 18 Jun 2010 05:13:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-25760</guid>
		<description>Hello,

How to map the first available drive in a batch file ...
net use ... 

Thanks,
Dom</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>How to map the first available drive in a batch file &#8230;<br />
net use &#8230; </p>
<p>Thanks,<br />
Dom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mo</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-24911</link>
		<dc:creator>Mo</dc:creator>
		<pubDate>Thu, 13 May 2010 22:48:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-24911</guid>
		<description>If you&#039;re in a batch job, you have to say %%computername instead of %computername%</description>
		<content:encoded><![CDATA[<p>If you&#039;re in a batch job, you have to say %%computername instead of %computername%</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: k0k0pelli</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-24448</link>
		<dc:creator>k0k0pelli</dc:creator>
		<pubDate>Tue, 27 Apr 2010 19:28:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-24448</guid>
		<description>All of this is great help.  Mine is a little more.  All machines are domain members, preparing for rollout, etc.  
I can net use j:\computername\c$ manually in a command prompt window, and it will return asking for username and password.  But if I have that same command set up in a batch file, with a set /p variable to request the machine name, it fails.    The set /p variable is important so we can map to each machine as we have them side by side new/old and map to pull data.

For instance:  
Echo mapping to old machine
echo &quot;enter old machine name&quot;
set /p computername=
net use j: \\%computername%\c$

I then get the answer that the network connection cannot be found.  
When it gets to the net use line and the %computername% variable, it has the correct machine name from what you enter above from the set /p entry.  It just won&#039;t complete the map.</description>
		<content:encoded><![CDATA[<p>All of this is great help.  Mine is a little more.  All machines are domain members, preparing for rollout, etc.<br />
I can net use j:\computername\c$ manually in a command prompt window, and it will return asking for username and password.  But if I have that same command set up in a batch file, with a set /p variable to request the machine name, it fails.    The set /p variable is important so we can map to each machine as we have them side by side new/old and map to pull data.</p>
<p>For instance:<br />
Echo mapping to old machine<br />
echo &#034;enter old machine name&#034;<br />
set /p computername=<br />
net use j: \\%computername%\c$</p>
<p>I then get the answer that the network connection cannot be found.<br />
When it gets to the net use line and the %computername% variable, it has the correct machine name from what you enter above from the set /p entry.  It just won&#039;t complete the map.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian.BOYOPE</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-24223</link>
		<dc:creator>Brian.BOYOPE</dc:creator>
		<pubDate>Tue, 20 Apr 2010 07:33:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-24223</guid>
		<description>please sent me more detailed information on how to create windows batch file.
 Thankyou..</description>
		<content:encoded><![CDATA[<p>please sent me more detailed information on how to create windows batch file.<br />
 Thankyou..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: @neil</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-21154</link>
		<dc:creator>@neil</dc:creator>
		<pubDate>Sun, 22 Nov 2009 04:31:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-21154</guid>
		<description>Can you please help me to create batch  file for opening few application in some time interval and website with id and password directly after running a batch file.

Please need your help guys would be appreciate if some one descirbe with  sample example

Thanks hips in advance</description>
		<content:encoded><![CDATA[<p>Can you please help me to create batch  file for opening few application in some time interval and website with id and password directly after running a batch file.</p>
<p>Please need your help guys would be appreciate if some one descirbe with  sample example</p>
<p>Thanks hips in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Praveen</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-20655</link>
		<dc:creator>Praveen</dc:creator>
		<pubDate>Wed, 14 Oct 2009 16:17:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-20655</guid>
		<description>Thanks a lot, the above blog came in really handy to resolve my issue. Keep up the good work. Thanks!</description>
		<content:encoded><![CDATA[<p>Thanks a lot, the above blog came in really handy to resolve my issue. Keep up the good work. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steven</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-20447</link>
		<dc:creator>Steven</dc:creator>
		<pubDate>Wed, 30 Sep 2009 08:55:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-20447</guid>
		<description>Thanks a lot that helped me to mapped several drives to windows XP clients through domain policy in AD</description>
		<content:encoded><![CDATA[<p>Thanks a lot that helped me to mapped several drives to windows XP clients through domain policy in AD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel Potgieter</title>
		<link>http://www.watchingthenet.com/create-a-batch-file-to-map-drives-folders.html#comment-16942</link>
		<dc:creator>Joel Potgieter</dc:creator>
		<pubDate>Wed, 07 Jan 2009 21:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.watchingthenet.com/?p=1270#comment-16942</guid>
		<description>Another option is to use the PUSHD and POPD commands; but they differ in the way that it binds network paths:

If you specify a network path, the pushd command temporarily assigns the first unused drive letter (starting with Z: and working backwards) to the specified network resource. The command then changes the current drive and directory to the specified directory on the newly assigned drive. If you use the popd command with command extensions enabled, the popd command removes the drive-letter assignation created by pushd.

It will help if you understand how stacks work; as POPD will remove the most recently executed PUSHD drive letter.

They can also be used to bind drive letters to any path as well.

More info in the &quot;Help and Support&quot; sections of Windows accessed by hitting F1 and searching for PUSHD or POPD.</description>
		<content:encoded><![CDATA[<p>Another option is to use the PUSHD and POPD commands; but they differ in the way that it binds network paths:</p>
<p>If you specify a network path, the pushd command temporarily assigns the first unused drive letter (starting with Z: and working backwards) to the specified network resource. The command then changes the current drive and directory to the specified directory on the newly assigned drive. If you use the popd command with command extensions enabled, the popd command removes the drive-letter assignation created by pushd.</p>
<p>It will help if you understand how stacks work; as POPD will remove the most recently executed PUSHD drive letter.</p>
<p>They can also be used to bind drive letters to any path as well.</p>
<p>More info in the &#034;Help and Support&#034; sections of Windows accessed by hitting F1 and searching for PUSHD or POPD.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
