Jump to content

Recommended Posts

Posted (edited)

this reg file for create module sfx.exe to context menu right clic

7zsfx3.reg

add 3 voice

create 7z archive (folder compress in 7z)

create sfx (folder container module 7zs*.sfx + file conf*.txt + file *.7z)

create sfx folder (module sfx + file config.txt in folder compress and convert in sfx)

file (win_7_8_contexmenu_ 7zsfx.7z for win 7-8 reg) file in context menu in cascade mode work in window 7 and windows 8 (x86 x64)

win_7_8_contexmenu_ 7zsfx.7z

Edited by odar
  • 1 month later...

Posted

Hello,

I would like to ask if is possible to propagate the exit code of "myprogram.exe" when the sfx file finish?


;!@Install@!UTF-8!
GUIMode="2"
RunProgram="myprogram.exe"
Autoinstall="myprogram.exe"
;!@InstallEnd@!

For example if myprogram.exe will exit with code 9 I want sfx file to return the same code.

Thank you,

c0nf

Posted
;!@Install@!UTF-8!
GUIMode="2"
RunProgram="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""
Autoinstall="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""
;!@InstallEnd@!

Posted

;!@Install@!UTF-8!
GUIMode="2"
RunProgram="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""
Autoinstall="hidcon:cmd /c myprogram.exe & Echo %ErrorLevel% >\"%%S\\Errorlog.txt\""
;!@InstallEnd@!

Hi gora,

thank you for your answer,

I can't test it for the moment to be sure so just to clarify for the forum operation :),

is this command will just print the Exit code in the error.txt file or will propagate it also in the exit code of my sfx file?

Cheers,

c0nf

Posted (edited)

Hello,

I would like to ask if is possible to propagate the exit code of "myprogram.exe" when the sfx file finish?


;!@Install@!UTF-8!
GUIMode="2"
RunProgram="myprogram.exe"
Autoinstall="myprogram.exe"
;!@InstallEnd@!

For example if myprogram.exe will exit with code 9 I want sfx file to return the same code.

Thank you,

c0nf

I think understand your question, but don't understand why...? can you explain me...?

Regards... ;-)

Edited by alfreire
Posted

AFAIK, gora's solution will only log the error code. Your code will then have to read it to find out what it was.

Cheers and Regards

Posted

I think understand your question, but don't understand why...? can you explain me...?

Regards... ;)

Because I am running a script inside the script. The first script will execute the main sfx.exe and will wait for a specific exit codes in order to Report the system that execution of "myprogram.exe" (program inside the sfx.exe) was executed with or without errors.

Cheers,

c0nf

Posted (edited)

or will propagate it also in the exit code of my sfx file?

No. The module will return only your own exit code.

Edited by gora
Posted

No. The module will return only your own exit code.

Correction: it's (module's) exit code.

At now no way to return external program exit code.

Posted

Is it possible to add a vertical scroll bar to the control containing BeginPrompt text to display more text in it than fits in the dialog (description of the archive contents, usage of the software in it, etc.)?

I am considering migrating to SevenZip from WinRar to use a larger compression dictionary, and need this functionality that's present in WinRar SFX modules (both old ones and new ones that call a MSIE window to show the text).

Sample screenshot

Posted

No. The module will return only your own exit code.

Correction: it's (module's) exit code.

At now no way to return external program exit code.

Thank you for the clarification. It would be amazing if you can include this option in the feature.

Cheers,

c0nf

  • 3 months later...
Posted

For ProgramData:

cmd /c Del /F /S /Q "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Test\Test.lnk"

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
RunProgram="hidcon:cmd /c del /F /S /Q ?????????????????????????????\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

For AppData:

cmd /c Del /F /S /Q "C:\Users\Test\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Test\Test.lnk"

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
RunProgram="hidcon:cmd /c del /F /S /Q ???????????????????????\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

how to remove shortcuts? please help!

Posted

SfxFolder23=C:\ProgramData\Microsoft\Windows\Start Menu\Programs
SfxFolder02=C:\Users\gora\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
Delete="%SfxFolder23%\\Test\\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

;!@Install@!UTF-8!
RunProgram="Setup.exe /S"
Delete="%SfxFolder02%\\Test\\Test.lnk"
GUIMode="2"
;!@InstallEnd@!

  • 3 months later...
  • 4 weeks later...

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...