/build/static/layout/Breadcrumb_cap_w.png

URGENT: installing and removing printers

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.


0 Comments   [ + ] Show comments

Answers (3)

Answer Summary:
Posted by: MichAda 9 years ago
Orange Belt
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.

Posted by: jscott 9 years ago
White Belt
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.
Posted by: Badger 9 years ago
Red Belt
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

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