Archive: Can NSIS install whole folder?


Can NSIS install whole folder?
I have an application that uses Java and needs the whole Java JRE folder installed. How can NSIS install the whole folder?


Re: Can NSIS install whole folder?

Originally posted by ananya
I have an application that uses Java and needs the whole Java JRE folder installed. How can NSIS install the whole folder?
Hi,

I think that the best course of action is to get the JRE setup file, and include it in your project.

Then check within your setup script if the end user has the correct java version, and if not, launch the JRE setup (preferably in silent mode with command line switches), before performing your setup routine.

Hope this helps, KenA

use this one:

file /r "folder"

KenA's solution is probably the only one that would work. I'm sure the Java platform is more than just a folder of files. The Java installer would probably write numerous registry entries and who knows what else to ensure that Java runs on the machine.

-Stu


Ok, I've been asked for some code about this, so I'm going to post a snippet of a setup project that I had to do a few months ago to install a piece of software that needed v1.4 of the JRE, in case somebody else need it.

I removed some extra stuff, and it may need some adpating (didn't check), but it should be a good starting point.

This information was valid at the time of v1.4.2 of the JRE.

All you need to do to use is to call the ManageJVM function before performing the setup routine.

KenA