1

I'm creating a SFX executable with 7-zip (command line version) and the 7zsd.sfx module. My current config file looks like this :

;!@Install@!UTF-8!
Title="Test"
BeginPrompt="Test"
CancelPrompt="Do you want to cancel the extraction?"
ExtractDialogText="Please, wait..."
ExtractPathText="Please, enter the extraction path:"
ExtractTitle="Extracting..."
GUIFlags="8+32+64+256+4096"
GUIMode="1"
InstallPath="%%S"
RunProgram="test2.bat"
;!@InstallEnd@!

Is it possible to run a program before extracting the files? Currently, test2.bat is ran once the files are extracted. I'd like :

  • The user click "OK"

  • test1.bat is executed

  • Files are extracted

  • test2.bat is executed

Using WinRAR's SFX, there is a presetup option. Is there something similar using 7-zip and 7zsd.sfx?

electrotype
  • 8,342
  • 11
  • 59
  • 96
  • 2
    I know this is an ancient post, but I have been looking SFXs today. Where did you find documentation on any of those items in the config file? The link you provided only has Title, BeginPrompt, etc. No ExtractPathText, IstallPath, GUIMode, etc. – detroitwilly Jul 24 '18 at 17:46

1 Answers1

3

One workaround I found is to extract the files to a temporary folder instead of the final target, run the first .bat file, xcopy the temp folder to the real target and finally run the last .bat.

electrotype
  • 8,342
  • 11
  • 59
  • 96