SYS

cmd.exe

/C ”rundll32 printui.dll,PrintUIEntry /in /n \\srv-print\

/C "rundll32 printui.dll,PrintUIEntry /q /dn /n \\srv-print\Prt-ITMain"

and same for adding. I can push the script and it returns successsful i even see the install happening on the client but printer never gets added.

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

0

I don't know crap about scripting and thought KACE would help with that, but I was still stuck trying to figure out scripting printer installs anyway.

This is crude, but it works for us.  If you find it more confusing, just disregard.

Use the shell script option in KACE.  In the "Scirpt Text" section, enter the two commands below modified to fit your environment.

---------------------------------------------------------

cscript C:\Windows\SysWOW64\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_192.168.1.12 -h 192.168.1.12 -o raw -n 9100

printui.dll,PrintUIEntry /if /b "Xerox7345" /f "\\ShareServer\Printers\Xerox\7345\x64\x2GPINX.inf" /r "IP_192.168.1.12" /m "Xerox WorkCentre 7345 PCL6"

---------------------------------------------------------

may be a little tricky identifing the *.inf, but I always get it form a gunea pig printer install.

The first line sets up the printer port using the windows provided vbs script.

The first set of quotes in the printui.dll line is how users will see the printer.

Second quotes the location of the .inf.

Third quotes points to the printer to the new tcp/ip port.

Forth quotes reference the exact driver name as identified by the inf when your doing a gunea install.

Answered 04/30/2014 by: MichAda
Orange Belt

Please log in to comment
0

I got it working:

  1. Launch “SYS\cmd.exe” with params “/C rundll32 printui.dll,PrintUIEntry /q /dn /n \\srv-print\Prt-ITMain”.
  2. Log “Printer removed Successfully.” to “status”.
  3. Launch “SYS\cmd.exe” with params “/C rundll32 printui.dll,PrintUIEntry /q /in /n \\srv-print\Prt-ITMain”.
  4. Log “Printer added Successfully.” to “status”. 
  5. Setup as "Online"
  6. Checked "run as user logged into console"
I appreciate your input. Jo.
Answered 05/01/2014 by: jscott
White Belt

Please log in to comment
0

The command you are using is only for the user that runs the command, are you running it in system context??

Here is a link to the technet ref which should help..

http://technet.microsoft.com/en-us/library/ee624057.aspx

Answered 04/19/2014 by: Badger
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share