Avatar of jskfan
jskfan
Flag for Cyprus asked on

using rundll32 printui printuientry

using  rundll32 printui  printuientry

I have csv file that has a list of computers. I would like to run the command  rundll32 printui  printuientry  against each computer on the list and install printer .

Any Help on achieving that ?

Thanks
Windows BatchScripting LanguagesPowershell

Avatar of undefined
Last Comment
jskfan

8/22/2022 - Mon
Michael Pfister

for /f %i in (computer.csv) do rundll32 printui.dll,PrintUIEntry /ga /c%i /n\\SERVER\printer

Open in new window


But if you're in a Windows domain I'd rather use Group Policy Preferences or maybe a logon script.
https://deployhappiness.com/deploying-printers-with-group-policy-preferences/
jskfan

ASKER
It is not windows domain unfortunately...targeted computers are in work group. they are thin client
by the way can you add username and password to the script, as  the workstation i logon and run the script is domain member
ASKER CERTIFIED SOLUTION
Michael Pfister

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
jskfan

ASKER
Michael Pfister

can you explain your Code, please?

if I understand your script is based on print server, and you are mapping to a printer located in the print server.

My task is to install local TCP/IP standard printer on each computer.
if I go to each computer manually I can add printer  through the wizard, select Local then TCP IP standard, then enter hostname , select HP as manufacturer then "HP Universal Printing PCL 6" as driver then enter the print queue name, then finish.

I could not get the printer to install properly with any script I have tried so far.
The problem is , after installing the printer , If I select properties of the printer I get an error that I posted in different question.
If you can try the script in your local computer, if it works then probably it might work on remote computers...I have not been  luck so far
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
jskfan

ASKER
i found this link : https://msfn.org/board/topic/26296-installing-network-printers-silently-heres-how/

he talks about exporting the registry on a computer that the printer has been installed successfully, but he did not include in his script  how to replicate that registry to other computers.
Michael Pfister

>> My task is to install local TCP/IP standard printer on each computer.

Thats new. Cany you use the priunter management *.vbs? Or Powershell?
jskfan

ASKER
I used Powershell, rundll32 printui  printuientry, and the built-in Vbs scripts [prndrv.vbs, prnprt.vbs, prnmng.vbs]

I was able to get the printer installed the proper driver to show up "HP Universal Printing PCL 6", however if I try to open the properties of the printer I get error, if I try to print test page it does not print....

I have been struggling with this issue for weeks.... and posted several questions about this issue.....I could not find a script that can install a printer properly....

I posted this question : https://www.experts-exchange.com/questions/29167363/A-Script-that-sends-keys-to-open-Wizard-and-create-printer.html
I thought if I can find a script that mimmic the Add Printer Wizard that might resolve the issue
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
jskfan

ASKER
will get to this topic sometime in the future
jskfan

ASKER
Thank you