my java 8 had disappeared
Since we've got nothing to hide, let me introduce you to the WinRAR SFX script behind the Hotfix 11 installer.
This is what we do:
Path=c:\Program Files\Ubisoft\IL-2 Sturmovik 1946
SavePath
PreSetup="%comspec%" /C "set __COMPAT_LAYER=RUNASINVOKER && start "" /wait "JSGME.exe" /da /x"
SetupCode
PreSetup="%comspec%" /C "IF EXIST "New Java Runtime File Backup" (RD /S /Q "New Java Runtime File Backup")"
SetupCode
PreSetup="%comspec%" /C "IF EXIST "lib" (RD /S /Q "lib")"
SetupCode
PreSetup="%comspec%" /C "IF EXIST "bin" (RD /S /Q "bin")"
SetupCode
PreSetup="%comspec%" /C "IF EXIST "jsgmemods/#UP#_Java_8" (RD /S /Q "jsgmemods/#UP#_Java_8")"
SetupCode
PreSetup="%comspec%" /C "IF EXIST "jsgmemods/#UP#_OpenJDK_19" (RD /S /Q "jsgmemods/#UP#_OpenJDK_19")"
SetupCode
Overwrite=1
And this is what it means, line by line.
Line 1 defines the default path where Hotfix 11 will be installed, if no other path was found in the registry. This is the default IL-2 1946 installation path. Note that since the application is 32bit, on 64bit systems "c:\Program Files" will automatically be converted to "c:\Program Files (x86)" (that's a windows thing).
Line 2 tells that whatever path the user installs Hotfix 11 to, will be the default path next time, regardless the setting in line 1.
Line 3 ("PreSetup blabla") runs JSGME with default user rights (no elevated prompt) and disables all activated mods (/da) and then exits JSGME (/x).
Line 4 tells the script to wait for the command from line 3 to finish before proceeding further.
Line 5 removes the "New Java Runtime File Backup" from your target Ultrapack game folder if it exists. This folder was introduced with the Java 8 and OpenJDK 19 JSGME options and is now obsolete, hence we get rid of it here.
Line 6 tells the script to wait for the command from line 5 to finish before proceeding further.
Line 7 removes the "lib" subfolder from your target Ultrapack game folder. This is because Hotfix 11 ships with a fresh, clean and lean Java 1.3 lib folder.
Line 8 tells the script to wait for the command from line 7 to finish before proceeding further.
Line 9 removes the "bin" subfolder from your target Ultrapack game folder. This is because Hotfix 11 ships with a fresh, clean and lean Java 1.3 + Selector 5.0.3 bin folder.
Line 10 tells the script to wait for the command from line 9 to finish before proceeding further.
Line 11 removes the Java 8 JSGME Option from your target Ultrapack game's jsgmemods subfolder.
Line 12 tells the script to wait for the command from line 11 to finish before proceeding further.
Line 13 removes the OpenJDK 19 JSGME Option from your target Ultrapack game's jsgmemods subfolder.
Line 14 tells the script to wait for the command from line 13 to finish before proceeding further.
Line 15 tells the script to overwrite files while extracting it's contents to the target Ultrapack game folder.
Further on, the rar file contents (in exe format since it's self extracting) will simply get extracted to the target Ultrapack game folder.
As you see, all activities happen within the target Ultrapack game folder. No files outside that path ever get touched.
Mike