Hi all,
Not sure if this is the best place but here's my issue (if you can help!)...
I have a Win2003 SP2 Server with Citrix 4.5 installed (terminal services).
ALL I WANT TO DO IS LET ME VB (logon script) delete everyone's network attached printers at logon!!
Here's my code:
=========================
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * From Win32_Printer Where Network = True")
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
==========================
It works as an admin but not as a user (as it's running at logon for my test user).
Error: Generic Failure
Code: 80041001
Source: SWbemObjectEx
Please help!
Thank yoU!
Brandon
Not sure if this is the best place but here's my issue (if you can help!)...
I have a Win2003 SP2 Server with Citrix 4.5 installed (terminal services).
ALL I WANT TO DO IS LET ME VB (logon script) delete everyone's network attached printers at logon!!
Here's my code:
=========================
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colInstalledPrinters = objWMIService.ExecQuery _
("Select * From Win32_Printer Where Network = True")
For Each objPrinter in colInstalledPrinters
objPrinter.Delete_
Next
==========================
It works as an admin but not as a user (as it's running at logon for my test user).
Error: Generic Failure
Code: 80041001
Source: SWbemObjectEx
Please help!
Thank yoU!
Brandon