Old 4th January 2010, 18:45   #1
muralla
Junior Member
 
Join Date: Jan 2010
Posts: 3
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 ¡¡¡
muralla is offline   Reply With Quote
Old 6th January 2010, 05:07   #2
meaningoflights
Member
 
Join Date: Jan 2008
Posts: 49
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
MCSD.Net
meaningoflights is offline   Reply With Quote
Old 6th January 2010, 05:14   #3
Joel
Debian user
(Forum King)
 
Joel's Avatar
 
Join Date: Jan 2003
Location: Arch land
Posts: 4,917
Hello.

As meaningoflights posted, ExecWait can help you, but usually way to do it is like:
PHP Code:
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 


* 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.
Joel is offline   Reply With Quote
Old 26th January 2010, 17:23   #4
muralla
Junior Member
 
Join Date: Jan 2010
Posts: 3
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.
muralla is offline   Reply With Quote
Old 26th January 2010, 22:35   #5
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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
MSG is offline   Reply With Quote
Old 26th January 2010, 22:40   #6
muralla
Junior Member
 
Join Date: Jan 2010
Posts: 3
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...
muralla is offline   Reply With Quote
Old 26th January 2010, 22:53   #7
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
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!
MSG is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump