Hi,
I am simply trying to write a script to help deploy printers and I have run into a bit of a snag. I cannot get the cmd window to open with the proper elevation to run commands like:
pnputil -i -a c:\print_drivers\driverstore\hp001a\prnhp001.inf
I can run this command manually from an elevated command line prompt without issue, however it will not work using:
#RequireAdmin
and/or
RunAsWait($adminAcct, @ComputerName, $adminPass, 0, @ComSpec & " /k pnputil -i -a c:\print_drivers\driverstore\hp001a\prnhp001.inf")
I get an error that says: "Adding the driver packaged failed : Access is denied."
Any advice would be greatly appreciated.