Sign in to follow this  
Followers 0
XIRAM

Problem with the , in a rundll32 printui.dll,PrintUIEntry

4 posts in this topic

Hello all,

I'm doing a soft to install all the printers of my computer park by choosing them with checkbox.

My script works well but I'm running a little issue.

To install a printer, I have this line (in a function):

RunWait(@ComSpec & " /c rundll32 printui.dll,PrintUIEntry /if /b " & $PortImp & ' /f "\\gre168\DRIVERS\Imprimantes\' & @OSArch & "\" & $PortImp & $DrivInfX86 & '" /r ' & $PortImp & ' /m "' & $DrivNom & '" /z')

The fact is that the "," caracter of printui.dll,PrintUIEntry is detected as a separator of the RunWait function.

If I let this line like this it's Ok it works, but if I add a "," after, it proposes me the [sHOW_FLAG] option, not the [WORKING DIR].

Thereby, I can't add a @SW_HIDE to hide the command prompt at each printer install.

Do you have an idea on how to solve that? maybe an alternate caracter?

Thanks!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

RunWait(@ComSpec & ' /c rundll32 printui.dll' & Chr(44) & 'PrintUIEntry', @ScriptDir, @SW_HIDE)

Chr(44) = Comma ","

Edited by johnmcloud

Share this post


Link to post
Share on other sites

What a badass, thank you that works well!

Is there a page which references all these codes? I found this (with your answer) : http://www.roubaixinteractive.com/PlayGround/Binary_Conversion/The_Characters.asp

but the comma est the chr(130)?

well done any case

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