Windows 2008 and Truecrypt: how to automatically mount shared folders after restart

network-sharetruecryptwindows-server-2008

On my Windows 2008 system, I've attached an external USB drive that's encrypted using Truecrypt. Once I mounted the Truecrypt drive, I share some of the directories from that drive using Windows file sharing. I find that whenever I restart the server, these shared directories are no longer shared and I to recreate share them. Pain.

Is there any way to avoid having to recreate these shares every time? Perhaps if I can script the sharing of the drives, perhaps I can run the script I mount the drive? If so, can someone tell me what the script commands are? For example, I want to share Z:\dir1 as \myserver\dir1 to everyone (no authentication required).

Thanks.

Best Answer

If you restart the server service then those shares should be restored.

If you wanted to script this just do a net stop server followed by a net start server.

Related Topic