XIRAM Posted April 9, 2013 Share Posted April 9, 2013 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! Link to comment Share on other sites More sharing options...
johnmcloud Posted April 9, 2013 Share Posted April 9, 2013 (edited) RunWait(@ComSpec & ' /c rundll32 printui.dll' & Chr(44) & 'PrintUIEntry', @ScriptDir, @SW_HIDE) Chr(44) = Comma "," Edited April 9, 2013 by johnmcloud Link to comment Share on other sites More sharing options...
XIRAM Posted April 9, 2013 Author Share Posted April 9, 2013 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 Link to comment Share on other sites More sharing options...
johnmcloud Posted April 9, 2013 Share Posted April 9, 2013 This:http://www.ascii-code.com/DEC = 44 = CommaYou are welcome Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now