views:

1083

answers:

3

I'm porting a windows program from 32 -> 64 bit. It has a 32 bit installer which is written using NSIS. Can I launch one of my new 64 bit exes using the 32 bit NSIS installer? I don't think there is a 64 bit version of NSIS...

+8  A: 

NSIS uses two Win32 APIs to execute processes ShellExecute (thru ExecShell) and CreateProcess (thru Exec and ExecWait), both of them can run 64 bit process (x64) from NSIS 32 bit process (as long as you're running on 64 bit OS).

Shay Erlichmen
Oh ok, I didn't think it was possible to create a 64 bit process from a 32 bit one. Is there anything special I have to do?
Benj
@Benj AFAIK, no.
Shay Erlichmen
+8  A: 

Sure you can, NSIS doesn't impose any restrictions and what's really nifty about NSIS is if you have both 32 and 64 bit versions of your app, you can do a combined installer, and install the required files on a per-architecture basis. e.g.

!include "x64.nsh"

${If} ${RunningX64}
    File ..\x64\blah.exe
${Else}
    File ..\x86\blah.exe
${EndIf}
sascha
A: 

just to add more descriptive

have a look, http://www.autoitscript.com/forum/index.php?showtopic=44048

S.Kumar