Link to home
Start Free TrialLog in
Avatar of jskfan
jskfanFlag for Cyprus

asked on

A Script that sends keys to open Wizard and create printer.

A Script that sends keys to open Wizard and create printer.

I have tried windows Scripts to create printers on remote computers , but did not work. but If I go to any of the remote computers and manually create printer going through  the wizard, it will work just fine.

So I would like to  have a script that sends the keys to open a wizard and create the printer:
Add Printer /The printer that I want is not listed/ Add a printer using TCP/IP address or hostname / type hostname or IP address and Port name / select the Manufacturer (HP) / HP Universal Printing PCL 6 /etc......etc.... /Next /Next....till the wizard is completed.

Thank you
ASKER CERTIFIED SOLUTION
Avatar of Alex
Alex
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jskfan

ASKER

these computers are not in the Domain.
I have a script that adds printer to remote computer, for some reason "HP Universal Printing PCL 6"  when added by scripts does not work properly. if I go to the remote computer and right click properties of the printer I get error displayed on the screenshot below

Thanks

for /f %%a in (C:\Scripts\CalledScripts\CompOnly.CSV) do (


@echo Creating Printer Port on %%a
cscript.exe "C:\windows\system32\Printing_Admin_Scripts\en-US\prnport.vbs" -a  -s %%a -r "Printerhostname" -h hostname -o raw -n 9100
@echo Setting Printer on %%a
cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a  -p "Printer Queue Name" -m "HP Universal Printing PCL 6" -r "Printerhostname" -s %%a
REM Not really needed, because the script will continue with the next machine


)

Open in new window

User generated image

If I install the Printer Manually through the Wizard then it works fine
Avatar of jskfan

ASKER

I found this command that runs the add printer wizard on my computer but installs the printer on the remote computer .
however when I open the properties of the printer on the remote computer I get the same error displayed on the screenshot posted on the previous comment

RUNDLL32.EXE PRINTUI.DLL,PrintUIEntry /il /c\\machine

Open in new window


if i go to the remote computer and install the printer using the wizard. then after the install, if I try to  open properties of the printer then I do not get the error.
Avatar of jskfan

ASKER

will get back to this topic sometime in the future