Archive: not a valid win32 application


not a valid win32 application
I'm compiling and running the following test script:

OutFile "hello_world.exe"
InstallDir $DESKTOP\hello_world
RequestExecutionLevel user

Page directory
Page instfiles

section ""
SetOutPath $INSTDIR
#File hello_world.nsi
messageBox MB_OK "Hello world!"
sectionEnd
If I uncomment the line "File hello_world.nsi" everything is OK, but as is it produces a "... is not a valid Win32 application" error in runtime. I am a complete beginner both in NSIS and in Windows, and would like to know why this happens. Or at least how to stay away from this problem.

Thanks.

tried the full path to hello_world.nsi?


NSIS version?
Unicode NSIS? (I have seen this happen with the latest unicode version)


Yes, Unicode NSIS, latest version (2.46.3). May it be safer to revert to an older release (reverting to ANSI isn't an option).


Or just extract an empty file to $PLUGINSDIR or something.

Stu


Is your script called hello_world.nsi and you want to include it in the installer?
It looks like recursion -> file hello_world.nsi is being read by NSIS compiler and also being packed into .resulting exe file.
Try to include some other file like "readme.txt" (create it)


Originally posted by T.Slappy
Is your script called hello_world.nsi and you want to include it in the installer?
It looks like recursion.
There is no recursion. Including the script is a perfectly legal command.

So yeah, works fine in unicode 2.46.


Originally posted by ptz
So yeah, works fine in unicode 2.46.
You mean 2.46.2 or .1? I only tested .3...