I have the following VBS code which is giving me this error message. To use this code I had to register the prnadmin.dll from the Windows 2003 server resource kit. Everything runs fine if it is run by a user in the local Administrator or Power Users group, but it doesn't run for other users. I work for the Department of Homeland Security so security is very important and I can't just give users power user rights to fix this issue. I am trying to figure out exactly what file or right or permission that needs to be changed in order to let this code run for all users. Anyone have any idea exactly what this code is calling that I may be able to elevate privledges for?
ERROR:
Line: 7
Char: 1
Error: Access is Denied
Code: 80070005
Source: (Null)
CODE:
dim oMaster
dim oPrinter
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
set oPrinter = CreateObject("Printer.Printer.1")
oMaster.PrinterGet "", "Dell Laser Printer 1710n PS3", oPrinter
oPrinter.Workoffline = true
oMaster.PrinterSet oPrinter
oMaster.PrinterGet "", "OFFICIAL 1710", oPrinter
oPrinter.Workoffline = true
oMaster.PrinterSet oPrinter
ERROR:
Line: 7
Char: 1
Error: Access is Denied
Code: 80070005
Source: (Null)
CODE:
dim oMaster
dim oPrinter
set oMaster = CreateObject("PrintMaster.PrintMaster.1")
set oPrinter = CreateObject("Printer.Printer.1")
oMaster.PrinterGet "", "Dell Laser Printer 1710n PS3", oPrinter
oPrinter.Workoffline = true
oMaster.PrinterSet oPrinter
oMaster.PrinterGet "", "OFFICIAL 1710", oPrinter
oPrinter.Workoffline = true
oMaster.PrinterSet oPrinter