/build/static/layout/Breadcrumb_cap_w.png

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 9 years ago
  • I have run as local system checked. - mbatescny 9 years ago
  • Try running in user context in case the printer is recorded in the user profile, see my other posting - EdT 9 years ago

Answers (1)

Posted by: EdT 9 years ago
Red Belt
0
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.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ