Archive: pre installation checking


pre installation checking
hello,
Through the installer i am creating,i want to install tomcat server.for which i need java development kit.I am also giving choice to install the java development kit.But if java development kit is not installed,then installation of tomcat gives error,for this i want to make it sure that jdk is installed first and then the tomcat.or in any way i need to check whether jdk is available or not.
how do i do this?
thanks in advance
-Vrunda


The following NSIS Archive page might help.


Use ReadRegStr
First read the registry string using ReadRegStr for the key HKLM\Software\Java Soft\Java Development Kit\Current Version and check for error using iferror if it says any error then the system does't have java else u will be getting the current version of java running in the variable. Hope this will help u. Have u got any idea of checking for administrator rights before installation.


Have u got any idea of checking for administrator rights before installation.
The FAQ tells you that:

How can I make sure the user installing my software has admin rights?
Use the IsAdmin DLL to find out.
If you are using version b0 or above you can use UserInfo.dll in your contrib folder.