probee
20th December 2004 22:49 UTC
Improper InstallDir
At first, sorry my poor english, i'm a hungarian guy :)
So, there's something wrong with the InstallDir (i'm using the 2.03 version).
There's my script:
InstallDir "$PROGRAMFILES\My Name\My Game"
The source directory look like this:
install
install/BIN
install/DATA
install/users
etc.
So, when i'm starting the setup.exe, the default location in the installer is:
C:\Program Files\BIN
Why???
I'm tried the "MyName/MyGame" to (without spaces), but nothing changes.
TIA
Afrow UK
20th December 2004 23:56 UTC
Could you attach your script please.
-Stu
probee
21st December 2004 00:07 UTC
Originally posted by Afrow UK
Could you attach your script please.
-Stu
Hi,
sure, here it is, thanks!
Afrow UK
21st December 2004 00:28 UTC
I honestly couldn't find anything seriously wrong with the script. I cut it down to a state where it was compilable and it works fine.
I did find one error though:
CreateShortCut "$DESKTOP\M.lnk" "BIN\M.exe" "" "$INSTDIR\M.ico"
You're missing $INSTDIR from that bit.
Put this into your script and see what happens:
Function .onInit
MessageBox MB_OK "$INSTDIR"
FunctionEnd
You should get something like "C:\Program Files\My Name\My Game"
-Stu
probee
21st December 2004 00:35 UTC
Originally posted by Afrow UK
Put this into your script and see what happens:
Function .onInit
MessageBox MB_OK "$INSTDIR"
FunctionEnd
You should get something like "C:\Program Files\My Name\My Game"
-Stu [/B]
Thanks! Done - here is the message:
"C:\Program Files\BIN"
:weird:
I don't understand...
probee
21st December 2004 01:14 UTC
I did it!
Well, last time I've made a mistake. The InstallDir was only the $programfiles. So, the installer put in the registry this entry, and the executable was c:\program files\BIN\m.exe. So, it's seems to me, the installer used the registry entry, and not that InstallDir value in the script... Strange. After I've deleted the registry key, the InstallDir path is correct.
Sorry for this.
pengyou
21st December 2004 01:20 UTC
Your script uses InstallDir _and_ InstallDirRegKey.
This means the installer will use the path stored in the registry (if the specified string exists) to override the setting in InstallDir. This feature lets the installer remember the previous installation folder (to make it easier to re-install to the same location).
If the registry entry does not exist, the installer will use the InstallDir setting.
See the NSIS Users Manual:
http://nsis.sourceforge.net/Docs/Chapter4.html#4.8.1.22