Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

SFX archives don't wait the setup programs

- - - - -

  • Please log in to reply
8 replies to this topic

#1
phaolo

phaolo

    Member

  • Member
  • PipPip
  • 189 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, 10 January 2011 - 02:12 PM.



How to remove advertisement from MSFN

#2
phaolo

phaolo

    Member

  • Member
  • PipPip
  • 189 posts
Noone?
Can someone, at least, confirm or deny the SFX behaviour?
Maybe it's just my Winrar version problem.. ?

#3
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • OS:XP Pro x86
  • Country: Country Flag
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.

#4
phaolo

phaolo

    Member

  • Member
  • PipPip
  • 189 posts

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, 14 January 2011 - 08:28 AM.


#5
Kelsenellenelvian

Kelsenellenelvian

    WPI Guru

  • Developer
  • 8,739 posts
  • OS:Windows 7 x64
  • Country: Country Flag

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, 14 January 2011 - 08:58 AM.


#6
phaolo

phaolo

    Member

  • Member
  • PipPip
  • 189 posts
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, 14 January 2011 - 12:05 PM.


#7
Geej

Geej

    Senior Member

  • Member
  • PipPipPipPip
  • 635 posts
  • OS:XP Pro x86
  • Country: Country Flag

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, 17 January 2011 - 07:33 PM.


#8
MHz

MHz

    Just simple

  • Member
  • PipPipPipPipPipPipPip
  • 1,653 posts
  • OS:Windows 7 x64
  • Country: Country Flag

...
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. :)

#9
phaolo

phaolo

    Member

  • Member
  • PipPip
  • 189 posts
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, 22 January 2011 - 05:36 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN