Problem Description:
1) Install Windows sysinternals suites from the following link
https://technet.microsoft.com/en-us/sysinternals/bb842062
2) Create the batch file as shown in the screen shot below.
echo ... >> D:\work\drivemounts\drivemount.log
echo =================================================== >> D:\work\drivemounts\drivemount.log
echo %DATE% %TIME% >> D:\work\drivemounts\drivemount.log
echo =================================================== >> D:\work\drivemounts\drivemount.log
net use P: /delete >> D:\work\drivemounts\drivemount.log
net use P: \\10.200.113.15\psoft /persistent:yes /user:domain\user <password> >> D:\work\drivemounts\drivemount.log
echo =================================================== >> D:\work\drivemounts\drivemount.log
echo ... >> D:\work\drivemounts\drivemount.log
echo =================================================== >> D:\work\drivemounts\drivemount.log
echo %DATE% %TIME% >> D:\work\drivemounts\drivemount.log
echo =================================================== >> D:\work\drivemounts\drivemount.log
net use P: /delete >> D:\work\drivemounts\drivemount.log
net use P: \\10.200.113.15\psoft /persistent:yes /user:domain\user <password> >> D:\work\drivemounts\drivemount.log
echo =================================================== >> D:\work\drivemounts\drivemount.log
echo ... >> D:\work\drivemounts\drivemount.log
http://www.nssm.cc/
4) use NSSM to schedule the MountNetworkDrives as services as shown in the screen shot above.
nssm.exe edit MountNetworkDrives
Let me know, if you have any questions.
Thanks
Zafrulla Khan.
No comments:
Post a Comment