Page 1 of 1

Windows Network Drives not Automounting

Posted: 2006-02-28 09:54pm
by Stark
Every time I reinstall my system and recreate the SMB drives I use to access my fileserver everything works fine. However, after a few months (it's five months now) it STOPS working. For instance, if I boot then open iTunes, it has a shit and says it can't find the z:/music directory. My frame-of-porn widget fails to start for the same reason. Mail fails.

As soon as I use windows explorer to follow the network drive link (ie, start-mycomp-z: ) everything works fine. I don't have to hit ips, or nav through the network/workgroup. Why the fuck does it stop working automatically?

Could it be something about my server? The OSX systems on my network ALSO don't automount the network share, even though its in the list of boot thingies. If I appleK it manually, it works fine.

Posted: 2006-03-01 01:24am
by Xon
Create a new textfile, and name it "mapdrives.vbs"

Code: Select all

On Error resume next

Set oNet = CreateObject("WScript.Network")

oNet.RemoveNetworkDrive "x:", "True", "True"

oNet.MapNetworkDrive "x:", "\\server\share", "True", "domain\user", "password"
Add a RemoveNetworkDrive and a MapNetworkDrive for each drive.

Put this in your profile's startup folder in the start menu. Enjoy .

Posted: 2006-03-01 01:27am
by Stark
Neat. I'd still like to know why it magically stops working, and why I need to brute force something so simple. Bah! :)