OK here is another problem. I can map the x drive but the h drive depends on different users. in this line (if you see at the bottom)
net use h: \\home\String$ /persistent:Yes
the user knows the value of 'String' and it is different for each. Whoever runs the file will have to input the 'String' and the batch file will save it so it wont ask for the string anymore. Can this be done?
Batch File Code:
------------------------------------------------------------------
rem this file will remove all current drive mappings on the respective
rem drive letter then remap the connections
@echo off
cls
echo.
echo If you are using this from home
echo.
cls
c:
cd\windows\system32
rem delete all the drives potentially in use
net use h: /d
net use x: /d
rem remap the drives
net use h: \\home\String$ /persistent:Yes
net use x: \\aaaa\abcd$ /persistent:Yes



Reply With Quote

Bookmarks