If you need to configure a network share as a drive letter mounted volume on a Windows Server, it can be done. The key here is to ensure the drive letter is available before services started by Windows Service Control Manager (SCM) need it. Also, this drive has to be unmounted before shutdown. Here is a recipe tested by our support team:
- Create two
batchfiles, one with a command to mount the network share and another to remove it. For example
The command invoked in the script to mount as Z drive: net use z: \\essan.evolphinpoc\ES_SAN /user:Administrator Password /persistent:yes
Please ensure the user name/password credentials allow read or write to the share from a Windows machine. Also, please ensure that a path is specified after the remote machine name/IP address. The mount is only created on a path to a folder.
unmount.batwill have script to remove the drive.
- Add the .bat files to a Windows Task setup to run at startup and shutdown respectively, using the “
Create Task” menu option:
- Specify the full path to your batch file in the task action (“Start a program”).
- Configure the tasks to run at Windows startup without any logged in user:
- Run the batch scripts to ensure that the drive letter gets mounted and unmounted as desired.
Finally, reboot the Windows Server to allow the task to mount the share as a drive letter.You will notice that the mounted drive-letter shows as a “Disconnected” network drive in windows explorer. This seems to be just a Windows annoyance. The drive will still be accessible by all users.