Skip to content
⌘ NSIS Forum Archive

Using Java after installing Java with NSIS

4 posts

JohnJohnson#

Using Java after installing Java with NSIS

Hello,

I have a question regarding Java and NSIS. I make an silent install of Java JDK and JRE 1.7.51, which is called from NSIS. This works fine, but directly after installing Java I run a batchscript which contains the following:
"java -doSomething"

The problem is that the batch-output says that java is an invalid command, therefore I think Java isn't recognized by some reason. When I stop the installer and start the batch manually it works fine. The problem only occurs when I open the batch file within the same install routine.

This also happens with some environmental variables, which are set during the same install routine.

Does anyone have an idea why this might happen?

I am using NSIS 2.46.
Anders#
Most of the samples on the wiki already do it:
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000