So let's write a section to embed JRE installer in your installer
Section "jre" SECJRE File "jre-6u14-windows-i586.exe" DetailPrint "Starting the JRE installation" ExecWait "$TEMP\jre-6u14-windows-i586.exe" SectionEnd
In line 2 it is checking the existence of the file "jre-6u14-windows-i586.exe". At the point of compiling NSIS script, this exe should exist in the stated relative path (in this case it should be inside the same folder as the nsis script file). In line 5 it will execute the jre installer and your installation program will be suspended until JRE installation is completed. After the JRE setup is complete it will resume the installation of your application. In this way, you can embed any number of installers inside your installer.
This can be improved in many ways. Well, before installing JRE, you can check whether JRE is already installed in the system. In that case you can consider the version too. If it is not installed then you can use the above script to install JRE. Another improvement is, instead of installing a precise JRE you can download the latest version from Internet and then install. This nsis example shows a similar thing.
4 comments:
thanks u for your lovely post.hope it will help me out.
also visit my blog www.ethicalstuffs.blogspot.com
Nice tutorial. One little thing...
Line 5 should be ExecWait "jre-6u14-windows-i586.exe"
Or line two should include the /oname=$TEMP\jre-6u14-windows-i586.exe option to put the JRE installer into the temp directory.
Water Hack Burns 2 lb of Fat OVERNIGHT
At least 160000 men and women are hacking their diet with a easy and secret "liquid hack" to burn 2lbs every night in their sleep.
It is simple and works all the time.
Here are the easy steps for this hack:
1) Take a drinking glass and fill it half full
2) Now use this weight loss hack
and you'll become 2lbs skinnier the next day!
Post a Comment