No announcement yet.

Extract and execute .exe file??

  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 ¡¡¡

  • #2
    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?
    Jeremy Thompson


    • #3

      As meaningoflights posted, ExecWait can help you, but usually way to do it is like:
      PHP Code:
      after long lines of code
      Be sure to created the tmp dir with InitPluginsDir
      File "YourExecutable.exe"
      ExecWait "$PLUGINSDIR\\YourExecutable.exe"

      * PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with MATE.
      * Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with MATE.


      • #4
        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.



        • #5
          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:


          • #6
            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...


            • #7
              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!