Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBS Error 80070005 (prnadmin.dll Rights Issue)

Status
Not open for further replies.

jgus

Technical User
Aug 3, 2001
15
US
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
 
have a look at regmon and filemon and see what resources are trying to be accessed when these commands are run...this should point you in the right direction
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top