Try adding some sleep statements to the script so it doesn't get too far ahead of itself. The value is in milliseconds.
Originally Posted by FN-GM
I've seen it where if the machine is processing too many other tasks in the background on logon for some reason it'll simply skip over certain scripted events like drive mappings and printer installations.
For printer deletion I've always used this:
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery("Select * from Win32_Printer",,48)
On Error Resume Next
For Each objPrinter in colInstalledPrinters
If InStr(LCase(objPrinter.Name), "SomeStringInThePrinterPath") Then
If Error <> 0 Then
'Just catch the error, moving on
'Nothing to see here folks, move along.