Jump to content

SFX archives don't wait the setup programs


phaolo

Recommended Posts

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? :angry:

Help! :(

Edited by phaolo
Link to comment
Share on other sites


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! :wacko:

---

SFX config examples:

Directx repackaged x86:


Path="%SYSTEMROOT%\Temp\directx"
SavePath
Setup="%SYSTEMROOT%\Temp\directx\dxsetup.exe" /silent <-- the switch outside the quotes is correct
Silent=1
Overwrite=1

Random program with batch commands and settings:


Path="%SYSTEMROOT%\Temp\spybot"
SavePath
Setup="%SYSTEMROOT%\Temp\spybot\temp.bat"
Silent=1
Overwrite=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 by phaolo
Link to comment
Share on other sites

Setup=Directx.bat

TempMode

Silent=1

Overwrite=1

Why 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 by Kelsenellenelvian
Link to comment
Share on other sites

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.ini
restoreext.bat

Vlc sfx current commands:
---------
Path="%APPDATA%\vlc"
SavePath
Setup="%APPDATA%\vlc\restoreext.bat"
Silent=1
Overwrite=1

This would need TempMode for the wait, but it shouldn't delete the files afterwards!

SFX setup should ALWAYS wait! :realmad:

Anyway, I don't have other choices.

So.. useful tip Kelsenellenelvian, thanks! :)

Edited by phaolo
Link to comment
Share on other sites

Example:

(very simple case just for clarity)


Vlc sfx contents:
----------------------
vlc-qt-interface.ini
restoreext.bat

Vlc sfx current commands:
---------
Path="%APPDATA%\vlc"
SavePath
Setup="%APPDATA%\vlc\restoreext.bat"
Silent=1
Overwrite=1

This would need TempMode for the wait, but it shouldn't delete the files afterwards!

SFX setup should ALWAYS wait! :realmad:

Try the following winrar sfx, (using 2 setup commands):

;The comment below contains SFX script commands

Setup=vlc-1.1.5-win32.exe /S
Setup=restoreext.bat
TempMode
Silent=1
Overwrite=1

restoreext.bat code as follows:

@echo off
REM Applicable for T13 only as %appdata% is not availble for use
Set 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.ini

Edit: modify restoreext.bat

Edited by Geej
Link to comment
Share on other sites

...

SFX setup should ALWAYS wait! :realmad:

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

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 ( :boring: ) 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. :yes:

-SendToA3X v1.7

I know the %COMSPEC% trick, thanks, but I usually adopt it with START /wait

What's the purpose in the vlc example? The SFX now should wait for the .bat with TempMode.

Edited by phaolo
Link to comment
Share on other sites

  • 4 years later...

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...