How to use Registry Entry?
Hi,
I'm fairly new to NSIS so my apologies if the answer to this question is entirely obvious.
I've spent the last couple of hours reading this forum trying to ascertain an answer to my question to no avail.
I need to read a registry entry containing the installation location of Java.
Then I'd like to use this registry entry to create a shortcut entry that will enable my Java program to run.
In the following code example I read the location and attempt to use it, but neither the FileOpen nor the FileWrite seem to properly use the $1 variable.
Thus, how can I use the $1 variable to create a fully qualified path?
Push $1
ReadRegStr $1 HKLM \
"SOFTWARE\JavaSoft\Java Runtime Environment\1.4\JavaHome" JavaHome
FileOpen $2 "$1\testfile.txt" "w"
FileWrite $2 "HELLO $1"
FileClose $2
BTW, I have successfully detected if Java is installed and the Java version using the IsNT function examples.
Thus, I know I'm on the right track, i.e. I've correctly used the ReadRegStr function in other instances.
I just need a little push to get me over the top.
Thanks for any and all help.
Regards,
OYAHHH