Logon script to map network drives VBS
Posted on 2011-02-24
I am no programmer by any means. The following I have extracted from my one of my company's logon scripts. It's purpose is to map a shared folder to a drive on the client computer. As far as scripts go, it is fairly straight forward.
On Error Resume Next
Set objNetwork = WScript.CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "J:" , "\\192.168.10.1\Applications"
objNetwork.MapNetworkDrive "K:" , "\\192.168.10.1\test Shared"
HOWEVER, even though it maps the folder and is accessible by the user, its appearence in My Computer is "disconnected". More specifically, the icon is in a light grey with a big red cross going through it. The description for the drive states "Disconnected Network Drive (J:)" and "Disconnected Network Drive (K:)". The script has also been assigned to the user via Group Policy (if that makes a difference).
Is anyone able to tell if the problem is with the script, or is there another configuration that needs to be applied?