Sign in to follow this  
Followers 0
jamesr94

Setting up printers with rundll

1 post in this topic

Hi,

Trying to install some printers on win2k3 with the "RUNDLL32 PRINTUI.DLL,PrintUIEntry" command. The reason we are doing this is because printmig doesn't work on 2k3 64bit and WMI won't install drivers without signing. Anyway I've created the below script and it will install every printer except this one:

"FX ApeosPort-III C4400 PCL 6" /f \\boqtstsql01\Packages\x64PrtDrv\APC4400\fx6jaie.inf

It installs all the below successfully:

"HP LaserJet 4100 Series PS"

"Xerox Phaser 6360DN PS" /f \\boqtstsql01\Packages\x64PrtDrv\6360WinXP03V_PS_x64_English\x26360P.inf

"Xerox Phaser 5500DN PS" /f \\boqtstsql01\Packages\x64PrtDrv\5500_Driver\x25500P.inf

"FX DP 340A-AP PS" /f \\boqtstsql01\Packages\x64PrtDrv\x64PS\FXUPCM02.INF

"FX DP C2535A PCL" /f \\boqtstsql01\Packages\x64PrtDrv\2535a2ndattempt\FXUCCM02.INF

"FX DocuCentre-II C4300 PS C" /f \\boqtstsql01\Packages\x64PrtDrv\174438-winamd64ps424613-080514-srapON\WinX64\fxpssrei.inf

"FX DocuCentre-II 2055 PS" /f \\boqtstsql01\Packages\x64PrtDrv\142520-42090901EN\English\amd64\fxpspzei.inf

"FX DocuCentre-II 2055 PCL 6" /f \\boqtstsql01\Packages\x64PrtDrv\142312-260391EN\English\amd64\fx6paie.inf

"FX DMC 186 PS" /f \\boqtstsql01\Packages\x64PrtDrv\10310-winv6ppdps1001-080514-chapON\WinX64\fxpschei.inf

"FX DC 1085 PS" /f \\boqtstsql01\Packages\x64PrtDrv\10310-winv6ppdps1001-080514-chapON\WinX64\fxpschei.inf

As you can see by my below run cmds it just appends the above lines to the command. I have tried all the below run commands and if I run the cmd from the run box, cmd box or batch file it works fine. As I said this code works for everyone of the other printers.

Func InstallPrinter ($line)

FileWriteLine($Log, "Installing Printer" & $line)

FileWriteLine($Log, "Running Command: RUNDLL32 PRINTUI.DLL,PrintUIEntry /ia /m " & $line)

;Run("RUNDLL32 PRINTUI.DLL,PrintUIEntry /ia /m " & $line, @SystemDir)

;Run(@COMSPEC & " /c RUNDLL32 PRINTUI.DLL,PrintUIEntry /ia /m " & $line, @TempDir)

_RunDOS("RUNDLL32 PRINTUI.DLL,PrintUIEntry /ia /m " & $line)

Sleep(35000)

If WinExists("Hardware Installation") Then

FileWriteLine($Log, "Bypassed Unsigned Drivers for " & $line)

WinActivate("Hardware Installation", "")

Send("c")

EndIf

EndFunc

It's just this one printer and it's driving me crazy! So if anyone can help i'd be very grateful.

Thanks,

James

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0