I had this question after viewing batch file to add map driver for network location and ask for credential
I have two "DC" and now I'm trying to create a batch or shortcut to DC2 to be map to other folders.
net.exe use X: \\APPS \PCC storage * /user:DC2\myname /persistent:no
Is this fine
or another below statement..
if Not exist y:\ (
echo Please enter User ID:
set /p USERID=
echo Please enter your Password:
set /p PASSWORD=
cmdkey.exe /add:APPS.US /user:dc2\myname /pass:%PASSWORD%
net use O: "\\APPS\PC1 storage" /persistent:YES