Menu

sfx with autorun

2015-09-28
2015-10-01
  • Bernd Maierhofer

    Hi + tx for any info.

    Using 7z 9.20 with sfx addon 9.20. What I do is to create my archive, create a sfx wich when run shold extract its contents to a tempdir and run a program contained in the archive and should wait before delteing the temp files until the exe is closed:

    cd CD_Image_2008
    ; here is the autorun.exe, so the archive should not caontain the parent path
    ; autorun needs in total 4 other files to be read
    c:\programme\7-zip\7z.exe a -mx=0 ..\nuts_2008.7z
    cd ..

    copy /b c:\programme\7-zip\sfx\7zS.sfx + CreateSFX.txt + nuts_2008.7z nuts_2008.exe

    The CreateSFX.txt is:

    ;!@Install@!UTF-8!
    Title="nut.s nutritional.software"
    RunProgram="autorun.exe"
    ;!@InstallEnd@!

    However, this does not work. It seems as if the autorun is executed, but at the same time the temp dir is removed, so autorun can not read the files and terminates with an error.

    What am I missing?

    Brgds Bernd

     
    • gora2

      gora2 - 2015-09-28

      1 Download modified module here
      2 Please read about prefix forcenowait
      Full description contains only Russian part of site

       
  • Bernd Maierhofer

    I can find the prefix nowait, however this seems to be the opposite of what I want. As wait is the default, I am unsure wheter these modfied modules will help.
    Can you direct my what is my problem and why these modules can hel me?

    Tx!

     
    • gora2

      gora2 - 2015-09-28
       
  • Bernd Maierhofer

    tx for this. But still: Why should a NOWAIT help me?

     
  • Bernd Maierhofer

    When I use InstallDir with a valid path, verything works ok. If I extract to a temp dir, the call to RunProgram fails.
    When is the conent of the temp dir deleted?

     
    • gora2

      gora2 - 2015-09-29
      ;!@Install@!UTF-8!
      Title="nut.s nutritional.software"
      RunProgram="waitall:autorun.exe"
      ;!@InstallEnd@!
      
      ;!@Install@!UTF-8!
      Title="nut.s nutritional.software"
      RunProgram="autorun.exe"
      ; delay 10 seconds
      RunProgram="hidcon:ping -n 11 localhost"
      ;!@InstallEnd@!
      
       
  • Bernd Maierhofer

    waitall did the trick.

    tx a lot!

     

Log in to post a comment.