phaolo Posted January 10, 2011 Share Posted January 10, 2011 (edited) Hello, I'm creating unattended setups for various applications.Some of them require extraction + execution, so I decided to use Winrar SFX archives.To my surprise, however, the SFX archives (sometimes?) don't wait for the command termination!For example they don't wait for:- bat files launched by the SFX (you can try with "pause" command)- some exe files (you can try with "notepad.exe")- some setups like net framewok (the SFX closes almost immediately while NetFx installs) Am I doing something wrong? I need the "wait" option for my RunOnceEx setup!Is there a switch to ORDER winrar to wait for the command termination, or something else? Help! Edited January 10, 2011 by phaolo Link to comment Share on other sites More sharing options...
phaolo Posted January 13, 2011 Author Share Posted January 13, 2011 Noone?Can someone, at least, confirm or deny the SFX behaviour?Maybe it's just my Winrar version problem.. ? Link to comment Share on other sites More sharing options...
Geej Posted January 14, 2011 Share Posted January 14, 2011 Try to make your post useful by posting your full problematic WINRAR sfx config.If you can be more specific to your problem, you might get faster reply. Link to comment Share on other sites More sharing options...
phaolo Posted January 14, 2011 Author Share Posted January 14, 2011 (edited) Try to make your post useful by posting your full problematic WINRAR sfx config.If you can be more specific to your problem, you might get faster reply.Ok, thanks, I'll post some examples (as I'm having this problem with ALL Winrar SFX).I just need a confirmation for now.---Execution example:1- a RunOnceEx or batch procedure calls a SFX ("start /wait" is not the problem here)2- the SFX extracts its files.3- the SFX launches its Setup program silently (if needed).4- the SFX closes immediately instead of waiting.5- the RunOnceEx or batch procedure is free to continue, even if the Setup has just started, thus overlapping to next commands. 6- random effects! ---SFX config examples:Directx repackaged x86:Path="%SYSTEMROOT%\Temp\directx"SavePathSetup="%SYSTEMROOT%\Temp\directx\dxsetup.exe" /silent <-- the switch outside the quotes is correct Silent=1Overwrite=1Random program with batch commands and settings:Path="%SYSTEMROOT%\Temp\spybot"SavePathSetup="%SYSTEMROOT%\Temp\spybot\temp.bat"Silent=1Overwrite=1---I've found some workarounds by calling the "Setups" directly from hdisk if extracted, or directly from the dvd if already uncompressed.Works, but Winrar SFX are not behaving as I expected from them.. (and those SFX become non-portable) Edited January 14, 2011 by phaolo Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted January 14, 2011 Share Posted January 14, 2011 (edited) Setup=Directx.batTempModeSilent=1Overwrite=1Why does it work this way?EACH winrar sfx file creates its own temp dir in the temp folder. (TempMode)Setup calls a file in that folder...Yes it is that easy!EDIT: Forgot to ad when the setup file is done winrar cleans up. Edited January 14, 2011 by Kelsenellenelvian Link to comment Share on other sites More sharing options...
phaolo Posted January 14, 2011 Author Share Posted January 14, 2011 (edited) OMG, it works that way!!It's so strange.. I expected a command like "Wait=1" at least.TempMode is very good for big setups, but for some direct extractions I'll have to use xcopy.Example:(very simple case just for clarity)Vlc sfx contents:----------------------vlc-qt-interface.inirestoreext.batVlc sfx current commands:---------Path="%APPDATA%\vlc"SavePathSetup="%APPDATA%\vlc\restoreext.bat"Silent=1Overwrite=1This would need TempMode for the wait, but it shouldn't delete the files afterwards!SFX setup should ALWAYS wait! Anyway, I don't have other choices.So.. useful tip Kelsenellenelvian, thanks! Edited January 14, 2011 by phaolo Link to comment Share on other sites More sharing options...
Geej Posted January 16, 2011 Share Posted January 16, 2011 (edited) Example:(very simple case just for clarity)Vlc sfx contents:----------------------vlc-qt-interface.inirestoreext.batVlc sfx current commands:---------Path="%APPDATA%\vlc"SavePathSetup="%APPDATA%\vlc\restoreext.bat"Silent=1Overwrite=1This would need TempMode for the wait, but it shouldn't delete the files afterwards!SFX setup should ALWAYS wait! Try the following winrar sfx, (using 2 setup commands): ;The comment below contains SFX script commandsSetup=vlc-1.1.5-win32.exe /SSetup=restoreext.batTempModeSilent=1Overwrite=1restoreext.bat code as follows:@echo offREM Applicable for T13 only as %appdata% is not availble for useSet defaultApvlc="%userprofile%\Application Data\vlc"md %defaultApvlc%copy vlc-qt-interface.ini %defaultApvlc%Your sfx exe should contains 3 files: vlc-1.1.5-win32.exe, restoreext.bat & vlc-qt-interface.iniEdit: modify restoreext.bat Edited January 18, 2011 by Geej Link to comment Share on other sites More sharing options...
MHz Posted January 19, 2011 Share Posted January 19, 2011 ...SFX setup should ALWAYS wait! Anyway, I don't have other choices....You can try to supply the SFX with an executable for handling the bat file so that the SFX may have the task of handling the process direct.This command may help:"%COMSPEC%" /c "%APPDATA%\vlc\restoreext.bat"Note that %COMSPEC% is a environmental variable to the command interpreter. The parameter "/c" initiates the command interpreter into command line mode. Link to comment Share on other sites More sharing options...
phaolo Posted January 22, 2011 Author Share Posted January 22, 2011 (edited) Oh, I've missed your last reply Geej, but I see that it suggests the batch copy method I've used.For direct extractions + config, I've just used a temp.bat file to:-copy files\dir (copy\xcopy).-apply settings or run other programs.Anyway I've changed ALL ( ) my archives to temp modes and now they work properly! The complete application setup lasted 60 mins more, but that's the price to pay for stability. -SendToA3X v1.7I know the %COMSPEC% trick, thanks, but I usually adopt it with START /waitWhat's the purpose in the vlc example? The SFX now should wait for the .bat with TempMode. Edited January 22, 2011 by phaolo Link to comment Share on other sites More sharing options...
Noorahimi Posted August 6, 2015 Share Posted August 6, 2015 how can i have winrar sfx to have a "finish" button/dialog? setups/sfxs created with winrar disappear into thin air after the extraction completes and it really bothers me. how can i have it say a "thank you" or "your program has been successfully installed" dialog after the extraction? like the actual winrar installer? 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