Old 20th November 2011, 15:13   #1
ptz
Junior Member
 
Join Date: Nov 2011
Posts: 8
not a valid win32 application

I'm compiling and running the following test script:
Quote:
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 is offline   Reply With Quote
Old 20th November 2011, 15:43   #2
Yathosho
Forum King
 
Yathosho's Avatar
 
Join Date: Jan 2002
Location: AT-DE
Posts: 3,366
tried the full path to hello_world.nsi?
Yathosho is offline   Reply With Quote
Old 20th November 2011, 15:50   #3
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
NSIS version?
Unicode NSIS? (I have seen this happen with the latest unicode version)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Old 20th November 2011, 17:07   #4
ptz
Junior Member
 
Join Date: Nov 2011
Posts: 8
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).
ptz is offline   Reply With Quote
Old 20th November 2011, 23:06   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Or just extract an empty file to $PLUGINSDIR or something.

Stu
Afrow UK is offline   Reply With Quote
Old 21st November 2011, 04:47   #6
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 555
Send a message via ICQ to 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)

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 21st November 2011, 07:36   #7
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
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.
MSG is offline   Reply With Quote
Old 24th November 2011, 12:52   #8
ptz
Junior Member
 
Join Date: Nov 2011
Posts: 8
So yeah, works fine in unicode 2.46.
ptz is offline   Reply With Quote
Old 24th November 2011, 19:28   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,358
Quote:
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...

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Tags
win32

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