Archive: Simple installer with JRE check part 1


Simple installer with JRE check part 1
Hi-ya

There are at least two errors in the JRE Check example script located at:

http://nsis.sourceforge.net/archive/...instances=0,48

Unless I am doing something really silly.

The first one I fixed:

line 29:
InstallDirRegKey HKLM "SOFTWARE\JRE Test ""

to:
InstallDirRegKey HKLM "SOFTWARE\JRE Test"

but the next one I thought I would ask some advice:

InstallDir: "$PROGRAMFILES\JRE Test"
InstallDirRegKey expects 3 parameters, got 2.
Usage: InstallDirRegKey root_key subkey entry_name
root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)
Error in script "C:\Documents and Settings\Kent Gibson\Desktop\Simple installer with JRE check part 1-1.nsi" on line 29 -- aborting creation process


thanks

kent


the subkey is missing, check what subkeys exist under your key ("SOFTWARE\JRE Test") and which points to the installdir


He missed a quote off:
InstallDirRegKey HKLM "SOFTWARE\JRE Test" ""

The last param is "" because it points to the default key.

-Stu


thanks, but I am not sure what you mean.

First all of I can see no keys in my registry resembling SOFTWARE\JRE Test, which makes sense cuz I have not installed anything. Ok there was also no directory like that. So I went and created one. And it still not work. I tried Program Files\JRE Test & Program Files\SOFTWARE\JRE Test.

Nowhere does it say what sort of preconditions it requires, hmm.

All I am doing is downloading it and trying to compile it.

There is also the line
!define JRE_URL "<path to a jre install>/jre.exe"

which I suppose means I am suppose to inster the path the jre which I did. but still fails on line 29.


yup you are right the last quote was missing but now comes a new error:

ReserveFile: "jre.ini" -> no files found.
Usage: ReserveFile [/nonfatal] [/r] [/x filespec [...]] file [file...]
Error in script "C:\Documents and Settings\Kent Gibson\Desktop\Simple installer with JRE check part 1-1.nsi" on line 72 -- aborting creation process

hmm, any ideas?