Archive: Extract and execute .exe file??


Extract and execute .exe file??
  Hi all ¡¡¡

I have create a installer based on zip file.
I put installer.exe /S and Nsis extracts the executable file.
Its possible, after this, NSIS execute the file?

Thanks all ¡¡¡


To execute a exe, one command is:

ExecWait "YourExecutable.exe"


ps: perhaps download HM NIS Edit Script Wizard and run go through File > New script from wizard.


NSIS has awesome compression so I dont understand why you'd use a zip? and is your exe a installer exe or the Application? If its the application then I'd recommend letting users run it on the last step of the install, eg:

...

; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\YourExecutable.exe"
!insertmacro MUI_PAGE_FINISH

...

Otherwise if it is the installer.exe can you clarify why your not just using NSIS?


Hello.

As meaningoflights posted, ExecWait can help you, but usually way to do it is like:


after long lines of code

Section-installme
>; Be sure to created the tmp dir with InitPluginsDir
SetOutPath "$PLUGINSDIR"
>File "YourExecutable.exe"
>ExecWait "$PLUGINSDIR\\YourExecutable.exe"
>SectionEnd
>

Sorry to make long time to reply.

I want 2 Steps.

1º)Xtract all the contents of nsis to a folder.
2º)Execute a .exe file of that folder.

I dont know nsis. Just to compres and decompress in a folder.

Can anyone write a simple example¿? But with all the commands, not with the end of the code.

Cheers.


If you want to learn NSIS, start with examining the examples, until you understand exactly what they do and why.
NSIS\Examples\example1.nsi and example2.nsi

Make use of the command reference to find out what the commands do:
http://nsis.sourceforge.net/Docs/Chapter4.html


Afther i have create installer based of zip file y have tryed to copy the code this generate, and create a .nsi file....
It not works.

Its possible to copy the code, when i create a installer based of zip file and in the end of the code, add a execute command??

Its very dificult for me create a code to compress a file...


The .nsi file generated by the zip converter would be of no use to you, if you don't know anything about the NSIS scripting language. You'll have to learn it.

Start with example1.nsi and example2.nsi, and keep the command reference at hand. Good luck!