Issue Installing Network printer

(imported topic written by SystemAdmin)

I am having trouble installing / setting up network printers through TEM. I am able to install the printer driver without any issues, I am able to create the TCP/IP port for the printer, but I am unable to get the printer to show up.

Target OS: Windows 7 - 64bit

//The following installs the Printer Driver successfully:

download http://sub.domain.tld:52311/Uploads/6063b9a2f8b5f990de8f9ee04cc347a226db4246/MPC3001.tmp

continue if {(size of it = 5336666 AND sha1 of it = “6063b9a2f8b5f990de8f9ee04cc347a226db4246”) of file “MPC3001.tmp” of folder “__Download”}

extract MPC3001.tmp

if{x64 of operating system}

waithidden cmd.exe /C {windows folder}\sysnative\pnputil -i -a “{(pathname of client folder of current site)}__Download\x64\z51627en\disk1\OEMSETUP.INF”

elseif{x32 of operating system}

waithidden cmd.exe /C {system folder}\pnputil -i -a “{(pathname of client folder of current site)}__Download\x86\z51627en\disk1\OEMSETUP.INF”

endif

//The following will successfully create the TCP/IP port for the printer:

waithidden Cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\Prnport.vbs -a -r IP_ip.add.re.ss -h ip.add.re.ss -o raw -n 9100

//The following DOES NOT work:

waithidden cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a -p “RICOH Aficio MP C3001 PCL 5c - HUB” -m “RICOH Aficio MP C3001 PCL 5c” -r “IP_ip.add.re.ss”

//The following alternative DOES NOT work either:

waithidden C:\Windows\System32\PRINTUI.EXE /ga /in /n “RICOH Aficio MP C3001 PCL 5c - HUB” /r “IP_ip.add.re.ss” /m “RICOH Aficio MP C3001 PCL 5c” /u /z

Anyone have any experience with this?

(imported comment written by YMC)

Hi, anyone have update on this?

Find out problem is because Local System have no rights to create new entry to WMI Win32

(imported comment written by MattPeterson)

I’ve used the following in the past to create the printer (after I created the port using the same method you outlined). However I never actually installed printer drivers, I just used built in Windows drivers, but I think if the driver is installed this should work.

//Create Printer
if {name of operating system as lowercase contains “win7”}
waithidden cmd.exe /c rundll32 printui.dll,PrintUIEntry /y /if /b “{parameter “Printer Name” of action}” /f %windir%\inf\ntprint.inf /r “IP_{parameter “IP Address” of action}” /m "HP LaserJet 4100 Series PCL6"
else
waithidden cmd.exe /c rundll32 printui.dll,PrintUIEntry /y /if /b “{parameter “Printer Name” of action}” /f %windir%\inf\ntprint.inf /r “IP_{parameter “IP Address” of action}” /m "HP LaserJet 4000 Series PCL6"
endif

//Set Printer as default
waithidden cmd.exe /c rundll32 printui.dll,PrintUIEntry /y /n “{parameter “Printer Name” of action}”

Printer name would be the name you want to the printer to have. IP_{parameter “IP Addess”} would be the name of the port you created. As you can see I was using the HP driver included in Windows (4100 for Win 7 and 4000 for older versions).

(imported comment written by YMC)

yeah thanks
MattPeterson
, tested running as Local System works

Below is what I’ll would be doing:

Add port

cmd.exe /c c:\windows\system32\cscript.exe C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_“1.1.1.1” -h “1.1.1.1” -o raw -n 9100

Add driver

cmd.exe /c c:\windows\system32\Cscript.exe C:\Windows\System32\Printing_Admin_Scripts\en-US\Prndrvr.vbs -a -m “HP Universal Printing PS” -v 3 -e “Windows NT x86” -i “C:\Drivers\HP4015\hpcu094d.inf”

Add IP print queue

cmd.exe /c rundll32 printui.dll,PrintUIEntry /y /if /b “1111 Test Printer” /f “C:\Driver\HP4015\hpcu094d.inf” /r “IP_1.1.1.1” /m “HP Universal Printing PS”