Hello,
I have installed NSIS on D:\Program Files\NSIS but when I use ${NSISDIR} it is C:\Program Files\NSIS.
Is ${NSISDIR} saved in the registry?
${NSISDIR} problem
14 posts
If you use the NSIS installer it will be set correctly. My NSISDIR is set to D:\...
Stu
Stu
Now I have installed NSIS on a new labtop (OS: XP Prof. English).
I have choosen the directory D:\Program Files\NSIS. You can see it on the picture.
Afterwarths I have started a small program to check the ${NSISDIR} variable
Name "NSISDIR Test"
OutFile "NSISDIR Test.exe"
Section
MessageBox MB_ICONINFORMATION|MB_OK "NSIS Verzeichnis Variable: ${NSISDIR}"
Sectionend On the pciture you can see that the NSISDIR variable is wrong.I had this problem on two pcs now. Please help me...
You do realise ${NSISDIR} is not a variable. It's a constant. The {} denote that. Variable names do not have {}.
${NSISDIR} is set to the NSIS directory path on compile time. If you build your installer under C:\Programme\NSIS then NSISDIR will always be that no matter where you run the installer from. Hence why it's called a constant.
Stu
${NSISDIR} is set to the NSIS directory path on compile time. If you build your installer under C:\Programme\NSIS then NSISDIR will always be that no matter where you run the installer from. Hence why it's called a constant.
Stu
ok, it is a constant.
But that is not the main problem.
the NSIS directory path on compile time is already wrong.
But that is not the main problem.
the NSIS directory path on compile time is already wrong.
What is the value stored in
HKLM "Software\NSIS" ""
Stu
HKLM "Software\NSIS" ""
Stu
D:\Program Files\NSIS
${NSISDIR} = C:\Programme\NSIS
${NSISDIR} = C:\Programme\NSIS
And you definitely recompiled that installer on the same machine?
Stu
Stu
yes, for sure...
my colleague told me that problem, so I have installed NSIS on my new labtop on D:\ and there was the same.
Did you try to reproduce this failure?
my colleague told me that problem, so I have installed NSIS on my new labtop on D:\ and there was the same.
Did you try to reproduce this failure?
${NSISDIR} is not taken from the registry and it's not a real constant either. It's taken from wherever you ran makensis.exe. If it runs from C:\Program Files\NSIS, it'll set ${NSISDIR} to C:\Program Files\NSIS.
My bad 🙂
Stu
Stu
Aha okay...
when i compile the nsi file with C:\Program Files\NSIS\makensis.exe the ${NSISDIR} constant in my installer is always "C:\Program Files\NSIS\".
How can I get the right NSISDIR of each PC when somebody starts the installer? Can I read the RegStr???
when i compile the nsi file with C:\Program Files\NSIS\makensis.exe the ${NSISDIR} constant in my installer is always "C:\Program Files\NSIS\".
How can I get the right NSISDIR of each PC when somebody starts the installer? Can I read the RegStr???
As Stu mentioned above the value is stored in registry,
use ReadRegStr $0 HKLM "Software\NSIS" ""
use ReadRegStr $0 HKLM "Software\NSIS" ""
Ok, I think I have it. Thank you very much...