I have found myself in the enviable position of trying to add a 3rd Party installer to an existing install4j project. We're trying to verify that the 3rd Party installer will not generate a separate UAC request on Windows Vista/7 when it launches. There are a couple of arguments I can use to make that installation silent which work from either Command Prompt or PowerShell.
I'm currently testing this with both install4j 5.0 and 5.1 because we haven't yet scheduled the build server's upgrade to 5.1. My test machine is a Windows 7 VM and I have tested with Java 1.6 and 1.7 bundled and 1.7 pre-installed.
During the installation the arguments do not appear to successfully get passed to the process. Using Process Explorer, I can see that CMD.EXE is launched with the command
C:\Windows\system32\cmd.exe /D /C "C:\Users\KRACHY~1\AppData\Local\Temp\i4j1544166103144462629.bat"
The batch file is calling out
"C:\Users\KRACHY~1\AppData\Local\Temp\E4JF73~1.TMP\user\VCREDI~1.EXE" /q /norestart
This then extracts setup.exe into a temporary folder and launches it with
c:\a87fe1446d33379e58\Setup.exe
I can track all this because that final setup is missing the /q /norestart arguments and it starts with a license agreement page that we got permission for much earlier in the installation.
Now, because the process is stopped, I can save all the files that have been extracted from the installer. If I run that batch file command line from a Command Prompt directly, the installer does indeed install quietly as expected. So, there's something when running as part of the full install4j process that is preventing the arguments from making it all the way to the final setup process. Possibly getting starved of environment space? How can I figure out exactly what's happening to these processes and/or fix it?
I would prefer if we didn't need to update our installation documentation just because we're now relying on this one library.
new ProcessBuilder("path to executable", "/q", "/norestart").redirectErrorStream(true).start().waitFor()in a "Run Script" action. Does that change anything? The intermediate batch file will go away in install4j 6. - Ingo Kegel