Batch file to map an external network drive and prompt for username and password
<p>I am fairly new to BAT File Scripting and I was wondering if someone could tell me and show me if it is possible to create a script that will map a network drive and prompt the user to enter their username and password as well as have it save their credentials so it does not prompt them every time they try to access the network drive? I read a few post here about using net use but I really didn't find anything to my situation. Only reason I am asking for this is because we have about 60 employees here and I really don't feel like mapping the drive one by one.</p>

<p>I have been working on this and this is what I have so far but it is not working for me. Is it because it is an external network?</p>

<pre><code>@echo off
net use z: /delete
echo PLEASE ENTER YOUR USER ID AND PRESS [ENTER]
set /p USERID=
echo PLEASE ENTER YOUR PASSWORD AND PRESS [ENTER]
set /p PASSWORD=

pause
net use Z: "\\SERVER.DOMAIN.ORG\workgroup" /USER:AZTUC\%USERID%
%PASSWORD% /PRESISTENT:YES
</code></pre>