I am new to VSCripts. I am starting with just mapping network drives and printers. When I created the following, which works fine when I double click on it, but if I added to a GPO, it does not work. I login and nothing happens, the script does not run. What am I doing wrong?
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "E:", "\\server\share"
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "T:", "\\server\share"
strPrinterPath = "\\printserver\printername"
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection strPrinterPath
strPrinterPath = "\\printserver\printername"
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection strPrinterPath
Thanks for the help
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "E:", "\\server\share"
Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "T:", "\\server\share"
strPrinterPath = "\\printserver\printername"
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection strPrinterPath
strPrinterPath = "\\printserver\printername"
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection strPrinterPath
Thanks for the help