Setting default printer
I'm trying to se the default printer using my K1000 server. I've create a script to set the default printer. It's not installing it.
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "\\server-print\HS-Library”
I have a the printer already installed on the workstation and when I run this script from the command line it works fine. How ever when I try to create a script with this line I get the following error:
“Operation could not be competed (error 0x00000709). Double check the printer name and make sure that the printer is connected to the network.”
Anyone have any thoughts on getting this working?
Thanks.
3 Comments
[ + ] Show comments
-
who are you running the script as? - SMal.tmcc 10 years ago
-
I have run as local system checked. - mbatescny 10 years ago
-
Try running in user context in case the printer is recorded in the user profile, see my other posting - EdT 10 years ago
Answers (1)
Please log in to answer
Posted by:
EdT
10 years ago
First of all, printer settings appear in both HKCU/Printers and HKLM\SYSTEM\CurrentControlSet\Control\Print. The first step is to set the default printer manually and check where exactly this is recorded in the registry. Then duplicate that setting in your process. In my current employer's environment, the majority of print devices are in HKLM but the default printer is in HKCU as it's one of those centralised services where you can log in at any networked printer and pull your print jobs to it. Of course, if your environment has user based settings you may not be able to do this simply at the system level.