windows 8 / server 2012 logon scripts
Posted on 2013-10-01
When we switched a few computers to windows 8 and windows 2012, I've noticed the logon scripts not mounting network drives anymore. If we run the scripts manually, then everything works as expected.
I have a script that maps a network share and printers, but when the logon script runs (as the user logs in), only the printers map. The network share *does not* map. If I log in, and run the script - via windows explorer - (\\server\netlogon\logon.vbs) then the network drive maps as normal. Did something change with the new editions of desktop/server os.
I tried to enable netlogon logging, but I didn't see anything relevant.
here is the relevant portion of my code:
Note: in the process of testing, after moving files, the DCSERVER and PRINTSERVER will be the same.
Set oNetwork = CreateObject("WScript.Network")
strUserName = oNetwork.Username
oNetwork.MapNetworkDrive "h:", G_DCSERVER & "\home$\" & strUsername
oNetwork.AddWindowsPrinterconnection G_PRINT_SERVER & "\printer 1"
oNetwork.AddWindowsPrinterconnection G_PRINT_SERVER & "\printer 2"