Jump to content

Problem Creating a exe using IExpress or 7-Zip


Recommended Posts

I am trying do an unattended install of a program called Surfer which was developed by Intercon Associates Inc. This is a rather old program but we still use it.

I was able to run the install program and get a copy of the install files. I then ran the setup.exe with the /r option to create the setup.iss file. I copied the setup.iss to the install folder and everything works using the setup.exe /s option directly or running it from a batch file.

The problem is that when I try creating a executable file using IExpress or 7-Zip the program doesn't install. It seems that the system is deleting the files before the application starts installing.

I have tried running a batch file which calls the setup using the /s option. I have also tried using the following

start /wait setup.exe /s

start /wait setup.exe /s /w

setup.exe /s

setup.exe /s /w

with no luck. If I put a pause statement at the end of the batch file then everything works. I suspect that setup.exe is creating another process and the install files are being deleted before this process finishes but don't know how to fix this problem.

Link to comment
Share on other sites


If you are using a setup.iss file, consider using the switch -s instead of /s or /S.

If your setup.iss file is in the same directory of setup files, then -s is enough.

On the other hand, if you had no error messages when installing the app, then the problem is not related to the packer you used to create the SFX. However, I recommend WinRAR.

To be clear, this line is in your batch file:

start /wait %..%\....\...\SFXName.exe (with no switches)

In WinRAR, under "Run after extraction", type:

setup.exe -s

Here's a good example: http://www.msfn.org/board/index.php?showtopic=16562

Edited by mazin
Link to comment
Share on other sites

The cmd /C start /wait setup /s command had the same effect.

WinRar worked but it didn't delete the install files. The other two applications deleted the install files so they failed.

I tried using the wait.exe command from the NT resource kit and this worked.

Surfer.bat

setup -s

wait 30

other code

In the end I didn't like any of the methods so I am simply using 7z to create an archive, uncompressing it to the temp folder during the install and running a batch file. In the last portion of the unattended install I clean out the temp folder so this works for me.

I chose 7z over zip and rar because I already have the command line version of 7z program on the unattended install CD, it had the best compression ration and it's free.

Link to comment
Share on other sites

  • 5 weeks later...

I figured out how to get this working and am posting in case anyone else need this information.

First I found that many setup.exe files support the /SMS option which forces the application to keep the setup.exe process open until all child process complete.

Thus "Setup.exe /s /SMS" works correctly. I added this command to a batch file which does some other things related to installing this application.

Finally I compressed everything using 7Zip into a self extracting install. Using the command line version of 7Zip and a simple batch file allows me to rebuild the self-extracting executable any time I make changes.

Note that command line options specified with the self extracting 7Zip file are passed to the batch file. I use this feature and the sed (GNU UNIX) command to set the serial number in the setup.iss file before running the install on another application I am installing using this method.

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