Quote Originally Posted by FN-GM View Post
I know 100% the script is running as a login script when i put an echo in it displays. But nothing happens. If the users runs the same script manually it runs perfect.
Thanks
Try adding some sleep statements to the script so it doesn't get too far ahead of itself. The value is in milliseconds.

Code:
WScript.Sleep 100
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:

Code:
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
		objNetwork.RemovePrinterConnection objPrinter.Name
	Next
	
	If Error <> 0 Then
		'Just catch the error, moving on
	Else
		'Nothing to see here folks, move along.
	End If