inno-setupjavapackager

Changing JavaPackager Temporary Output Directory


I am attempting to bundle a Windows installer using InnoSetup5/JavaPackager.

https://docs.oracle.com/javase/8/docs/technotes/tools/windows/javapackager.html

Part of the packaging process involves the creation and use of temporary files in a generated folder in the user directory, such as AppData\Local\Temp\fxbundler7992120689013207236

We are running into the following error: How to fix Inno Setup error EndUpdateResource failed (110)

We must have McAfee Anti-Virus software running and I believe this to be the culprit, and we are not permitted to add an exclusion for the entire Temp folder.

Is there a way of changing the location of these generated folders to a different location, such as C:\BundleTemp?


Solution

  • It turns out that you can change which directory is used for the InnoSetup5 temporary bundle files by changing the "TMP" Windows environment variable either in system/account environment variables or, if you're like me using a PowerShell script, as follows to only change it for the scope of the one script:

    $env:TMP = C:\MyNewTempFolder
    

    ..then execute your javapackager in the same script.

    (Just remember to create the directory in your script if it doesn't exist already)

    Whether this fixes our issue remains to be seen after we let it run, but this answers the above question. Will update with our results.