ametrano
11th October 2001 15:13 UTC
Problem with reading NSIS install dir
Hi all
I have a problems reading from the registry the install dir of NSIS and then using it to point to splash.exe
Let's the script speak:
Function .onInit
SetOutPath $TEMP
File /oname=spltmp.bmp "Docs\images\QL-largish.bmp"
; the following 2 lines do not work
; ReadRegStr $0 HKEY_LOCAL_MACHINE SOFTWARE\NSIS ""
; File /oname=spltmp.exe "$0\splash.exe"
File /oname=spltmp.exe "E:\program files\nsis\splash.exe"
ExecWait '"$TEMP\spltmp.exe" 4000 $HWNDPARENT $TEMP\spltmp'
Delete $TEMP\spltmp.exe
Delete $TEMP\spltmp.bmp
FunctionEnd
Of course I would like the script to be more general, removing the absolute path to my NSIS installation.
Any suggestion?
thank you in advance
ciao -- Nando
Olfred
11th October 2001 17:46 UTC
try HKLM and not HKEY_LOCAL_MACHINE
DuaneJeffers
11th October 2001 21:55 UTC
The Splash Function needs the exact location. Relative location is a bad idea. I really needs exact location.
-Duane
ametrano
12th October 2001 09:05 UTC
Olfred: I already tried HKLM, but it doesn't work.
DuaneJeffers:
> The Splash Function needs the exact location.
> Relative location is a bad idea.
well what I'm trying to do with:
ReadRegStr $0 HKLM SOFTWARE\NSIS ""
File /oname=spltmp.exe "$0\splash.exe"
is to have the string "$0\splash.exe" to hold the full path to the splash executable. The problem is that since I'm not the only one using the .nsi script I do not want to bind the script to my installation. Instead I would like the script to learn from the registry where to find splash.exe
still confused about why those 2 lines do not work
thank you
ciao -- Nando
Olfred
12th October 2001 18:27 UTC
try ReadRegStr $0 HKLM SOFTWARE\NSIS "(Standard)"