Logoff Script problems and GPO
I have been having a problem with one laptop running a .VBS script when a user logs off it. The script below is set to run at log off via GPO and it works great on all the other laptops/PCs we have here. Unfortunately theres always one...
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * from Win32_Printer Where Network = TRUE")
For Each objPrinter in colInstalledPrinters
Has anyone got any ideas as to how I can add a form of try/catch statement to this so it just quits if it errors? At the moment its just sitting there running scripts until it reaches 10mins and times out!
Any help would be greatly appreciated