Skip to content
⌘ NSIS Forum Archive

not a valid win32 application

9 posts

ptz#

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.
ptz#
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).
T.Slappy#
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)
MSG#
Originally Posted by T.Slappy View Post
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.
Anders#
Originally Posted by ptz View Post
So yeah, works fine in unicode 2.46.
You mean 2.46.2 or .1? I only tested .3...