ThePackager Posted February 23, 2015 Posted February 23, 2015 I have a sfx extraction question. Does anyone know of a way to supress pop-up error messages and have them write out the cmd prompt or txt instead? I use the sfx with automated deployments of unattended installs and every once in a while I get an install that hangs. Since the installs are being done under a deployment account, we can't access the desktop to see the error message. This makes troubleshooting hard and time consuming. So far the hanging seems to be typically caused by a locked files or an invalid path. Example of extraction command: mySfx.exe" -y -gm2 -InstallPath="C:\\mySfxPath\\location" Thank you,ThePackager
electrotype Posted April 20, 2015 Posted April 20, 2015 (edited) Hi, I'm trying to pass a parameter containing spaces when calling the installer, but it doesn't seem to work. For example :installer.exe -! firstParam "C:\some path with space\test"This is supposed to call a .bat file and pass it the two parameters. The .bat is declared as :RunProgram="cmd /C \"%%T\test.bat\""It doesn't work. It seems that as soon as there is a quote in the parameters passed to "installer.exe", then "test.bat" is not called correctly. When I do not use spaces or quotes : installer.exe -! firstParam secondParamThen "test.bat" correctly receives "secondParam" as the second parameter! How can I pass a parameter containg spaces? I've tried without success : installer.exe -! firstParam "C:\some path with space\test"installer.exe -! firstParam \"C:\some path with space\test\"installer.exe -! firstParam \\"C:\some path with space\test\\"Even that doesn't work :installer.exe -! firstParam "secondParam"Thanks in advance! Edited April 20, 2015 by electrotype
gora Posted April 21, 2015 Posted April 21, 2015 config:;!@Install@!UTF-8!RunProgram="test.bat";!@InstallEnd@!test.bat:@Echo OffEcho %1Echo %2Pausestart line:test.exe -! firstParam "C:\\some path with space\\test"out console:firstParam"C:\\some path with space\\test"Для продолжения нажмите любую клавишу . . .
dencorso Posted April 21, 2015 Posted April 21, 2015 Для продолжения нажмите любую клавишу . . . It means: "Press any key to continue..."
electrotype Posted April 21, 2015 Posted April 21, 2015 Well, I'll have to find what is different for me then! I guess it has something to do with :RunProgram="cmd /C \"%%T\test.bat\""vs.RunProgram="test.bat"I'll check that tomorrow. Thanks for your help!
gora Posted April 21, 2015 Posted April 21, 2015 RunProgram="cmd /C \"%%T\test.bat\""This is ERROR, correct as follows:RunProgram="cmd /C \"%%T\\test.bat\""
electrotype Posted April 21, 2015 Posted April 21, 2015 Ok, so when launching using params with quotes, for example :test.exe -! firstParam "secondParam"This works :RunProgram="cmd /C test.bat"But this doesn't work :RunProgram="cmd /C \"test.bat\""The problem is that I need to put "test.bat" inside quotes because it is, in fact, more something like this in my case :RunProgram="cmd /C \"%%T\\some path\\test.bat\""The workaround is to remove "cmd /C" completely and then it works :RunProgram="\"%%T\\some path\\test.bat\""I'm not sure if there is a difference when launching the .bat directly or using "cmd /C" though...
gora Posted April 21, 2015 Posted April 21, 2015 RunProgram="cmd /C \"%%T\\some path\\test.bat\""In this line you want to remove unnecessary:cmd /Cand%%T\\RunProgram="\"some path\\test.bat\""
Briesmi Posted April 24, 2015 Posted April 24, 2015 Verry nice tool, thanks!! But how can i change the language for the defgault "Yes" and "No" buttons e.g. for the Begin Prompt? Thanks so much!
gora Posted April 24, 2015 Posted April 24, 2015 config:SetEnvironment="SfxString25=Button OK"SetEnvironment="SfxString26=Button Cancel"SetEnvironment="SfxString27=Button Yes"SetEnvironment="SfxString28=Button No"module version - 1.6 develop (build 2797) 25.03.13 1
Briesmi Posted April 24, 2015 Posted April 24, 2015 Thanks for that quick answer! Do i have to set the variables in the config.txt? I tried but it doesn't work. Thanks again!
gora Posted April 24, 2015 Posted April 24, 2015 Do i have to set the variables in the config.txt? Yes I tried but it doesn't work. I have everything working
Briesmi Posted April 24, 2015 Posted April 24, 2015 (edited) Ok but cant find that version in the download section... module version - 1.6 develop (build 2797) 25.03.13 http://7zsfx.info/en/download.html Edited April 24, 2015 by Briesmi
gora Posted April 24, 2015 Posted April 24, 2015 http://svn.7zsfx.info/filedetails.php?repname=7zSfxMod&path=%2Ftags%2F1.6.0.2797%2Fbin%2F7zsd_160_2797.7z 1
Briesmi Posted April 24, 2015 Posted April 24, 2015 Gora, thanks sooo much! It works, awesome. Happy weekend!
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