Just for completion, here's the vbs way. This shouldn't give any pop-up windows (unless there's a problem).
AddNetworkDrive.vbs:
Code:
Dim WSHNetwork
Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.MapNetworkDrive "Z:", "\\<PCName>\<ShareName>", "True" , "<LoginName>" , "<Password>"
You don't need the , "<LoginName>" , "<Password>" bit if you have matching user accounts on the 'server' PC. But it comes in handy if you want everyone to authenticate as a generic user/password
RemoveNetworkDrive.vbs:
Code:
Dim WSHNetwork
Set WSHNetwork = CreateObject("WScript.Network")
WSHNetwork.RemoveNetworkDrive ("Z:"), True, True
Social Networking Bookmarks