Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I'm trying to automate drive mapping on a PC, so that whever that PC reboots, it will automatically login to an NT server and map a drive to it. This mapping needs to work automatically regardless of the user currently logged in to that PC.
I put the following command into a batch file and schedule it as a service:
net use G: \\cxxxx.xxx.xxxxxxx.xxx\mdbs %pass% /user:xxxx\xxxxxx
The problem I have is that it always asks for the password, even though it is already specified in the line above. After I enter the password it works but it needs to be automagic.I tried using PERSISTENT:YES option but it did not work.
Any idea how to avoid re-entering the password when running this batch file?Any response would be appreciated.
Thanks,
Mike

Use a log in script. User logs on, the login script executes and maps the drive.
Use notepad, type net use g: \\server\share
Save it as a login.bat and save it in the Winnt\system32\repl\export\scripts folder and then in User Manager for Domains, enter the name of the login script in the appropriate box.

Instead of a service, try running it as a batch file in the ALL USERS STARTUP folder.
Either the service does not have enough authority to send a password or the service is loading too quickly before the proper NT transports are up and running.
The only problem with the batch file startup folder is that people can see the passwords if they know where to look.
There is a freeware utility called Folder Hide that you can use to hide the startup folder.
~BluScarab~
HACK THE PLANET!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |