FrankE9999 Posted May 17, 2004 Posted May 17, 2004 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 followingstart /wait setup.exe /s start /wait setup.exe /s /wsetup.exe /ssetup.exe /s /wwith 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.
maxXPsoft Posted May 17, 2004 Posted May 17, 2004 Perhaps try call it like thiscmd /C start /wait setup /sProbably right setup calls something else then closes thus ending the batch.
mazin Posted May 17, 2004 Posted May 17, 2004 (edited) 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 -sHere's a good example: http://www.msfn.org/board/index.php?showtopic=16562 Edited May 17, 2004 by mazin
FrankE9999 Posted May 18, 2004 Author Posted May 18, 2004 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 codeIn 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.
FrankE9999 Posted June 17, 2004 Author Posted June 17, 2004 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.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now