bphlpt Posted March 24, 2014 Share Posted March 24, 2014 Be aware (from 5eraph http://www.ryanvm.net/forum/viewtopic.php?p=136570#136570) : This is what I can find about JRE8 on XP:JRE8 won't install on 32-bit XP — installing JDK8 on Windows XP - advapi32.dll errorJRE8 appears to install on 64-bit XP, but won't work — Installing Java 8 on Windows XP %5Bx64%5DJRE8 may "theoretically" take advantage of DX10+ — Java 8 not supporting Windows XP Cheers and Regards Quote Link to comment Share on other sites More sharing options...
mooms Posted March 26, 2014 Author Share Posted March 26, 2014 Java 8 is supported by my maker. Tested the install on XP, it works. edit; Install works, but not Java itself. Quote Link to comment Share on other sites More sharing options...
bphlpt Posted March 26, 2014 Share Posted March 26, 2014 That's great mooms! I don't have access to an XP install to test myself, so hopefully 5eraph can confirm this, since he was the one that originally posted the problem. Cheers and Regards Quote Link to comment Share on other sites More sharing options...
edwingal Posted April 19, 2014 Share Posted April 19, 2014 Works for me..thanks Quote Link to comment Share on other sites More sharing options...
Boskorp Posted May 29, 2014 Share Posted May 29, 2014 Hello mooms, Wanted to ask if there is an option to include the -ai option directly into the SFX without showing the info message when SFX is ran. Cheers Quote Link to comment Share on other sites More sharing options...
mooms Posted May 29, 2014 Author Share Posted May 29, 2014 If you add the -ai switch the SFX is ran silently.If you want it silent when double clicked or ran without any switches, you have to modify the script.You have to understand the syntax of a 7zip SFX. There is many topics explaining it here, or see the help file. Quote Link to comment Share on other sites More sharing options...
filter Posted May 30, 2014 Share Posted May 30, 2014 I download the x86 & x64 package (jre-7u60-windows-i586 & jre-7u60-windows-x64). when i run the program i have error ''this installation package could not be opened. verify that the package exists...'' Quote Link to comment Share on other sites More sharing options...
mooms Posted May 30, 2014 Author Share Posted May 30, 2014 Do you have followed the instructions on the first post ? How to use: - Extract the archive in a work folder with no space in the path. - Download the x86 and/or x64 Offline setup of Java 6/7/8 and put it in the same folder. - Run the batch file. Also check that the installers are not corrupted. Quote Link to comment Share on other sites More sharing options...
filter Posted May 30, 2014 Share Posted May 30, 2014 (edited) OK! I fix it. the problem was in the name, have 1 space. Thanks Mooms Edited May 30, 2014 by filter Quote Link to comment Share on other sites More sharing options...
Boskorp Posted August 21, 2014 Share Posted August 21, 2014 7Zip doesn't open jre v8u20 anymore, any solution? Quote Link to comment Share on other sites More sharing options...
mooms Posted August 21, 2014 Author Share Posted August 21, 2014 nope. Quote Link to comment Share on other sites More sharing options...
hamzaaan Posted August 26, 2014 Share Posted August 26, 2014 hello.the Java soft is update to first betaJRE 9 BETA HOW CAN USE THE SFX MAKER? Quote Link to comment Share on other sites More sharing options...
stashekmajcherc Posted October 27, 2014 Share Posted October 27, 2014 ""Extract the archive in a work folder with no space in the path."" Sorry but what is taht suppose to mean? I do not understand.I use winrar and the program exstact the files properly I guess? Quote Link to comment Share on other sites More sharing options...
mooms Posted October 27, 2014 Author Share Posted October 27, 2014 C:\Program Files\ <--spaceC:\progs\ <-- no space This maker is not compatible with newer releases of Java 8 (or 9) anyway. Quote Link to comment Share on other sites More sharing options...
papageorgiou Posted October 29, 2014 Share Posted October 29, 2014 (edited) Here was my solution. I first noticed with 8u20 that the 64bit version when extracted had different file names so the rename commands failed.ren "%~dp0JRE_TEMP64\%JAVAFN64%_101_JAVA_INSTALLER.bin" jre64_inst.msiren "%~dp0JRE_TEMP64\%JAVAFN64%_102_JAVA_INSTALLER.bin" Data1.cab needed to be changed toren "%~dp0JRE_TEMP64\%JAVAFN64%_105_JAVA_INSTALLER.bin" jre64_inst.msiren "%~dp0JRE_TEMP64\%JAVAFN64%_103_JAVA_INSTALLER.bin" Data1.cab Then with 8u25, the files did not extract correctly, so I changed the script (see below) to launch the exe(s) and then grab the msi from the profile temp and then kill the exe(s). It seems to work nicely so far. The lines in bold are where the changes can be found. @echo offsetlocal enableextensionsif not exist "%~dp0bin\7za.exe" goto :No7zaif not exist "%~dp0bin\JavaInst.sfx" goto :No7SFXif not exist "%~dp0bin\ResourcesExtract.exe" goto :NoResExtrSET SZ="%~dp0bin\7za.exe"if exist "%~dp0jre-*-windows-i586.exe" GOTO :X86if not exist "%~dp0jre-*-windows-i586.exe" GOTO :X64 :X86if exist "%~dp0jre-*-windows-x64.exe" GOTO :DUALset JAVAFILE=for %%j in (%~dp0jre-*-windows-i586.exe) do call :GETJAVAVER %%~nxjif "%JAVAFILE%"=="" goto :NoJavaInstfor /f "delims=- tokens=2" %%j in ("%JAVAFILE%") do set JAVAVER=%%jSET MAJ=%JAVAVER:~0,1%SET MIN=%JAVAVER:~2,3%if exist "%~dp0JRE_TEMP" rmdir /s /q "%~dp0JRE_TEMP"mkdir "%~dp0JRE_TEMP"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE%" /DestFolder "%~dp0JRE_TEMP" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP\%JAVAFN%_101_JAVA_INSTALLER.bin" jre_inst.msi::ren "%~dp0JRE_TEMP\%JAVAFN%_102_JAVA_INSTALLER.bin" Data1.cab::del /f /q "%~dp0JRE_TEMP\%JAVAFN%*" ECHO.ECHO Launching JRE 32bit to grab msi . . .start "Launching JRE 32bit to grab msi . . ." "%~dp0%JAVAFILE%"if exist "%~dp0JRE_ADMAIO" rmdir /s /q "%~dp0JRE_ADMAIO"mkdir "%~dp0JRE_ADMAIO":DUAL32BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL32BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP\jre_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE% start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP\jre_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADM"rmdir /s /q "%~dp0JRE_TEMP"%SZ% a "%~dp0JavaInst.7z" "%~dp0JRE_ADM\*" -mx=9 -mmt=off -m0=BCJ2 -m1=LZMA:d27:fb=128:mc=256 -m2=LZMA:d24:fb=128:mc=256 -m3=LZMA:d24:fb=128:mc=256 -mb0:1 -mb0s1:2 -mb0s2:3 -rcall :CONFIGcopy /b /y "%~dp0bin\JavaInst.sfx"+"%~dp032.cfg"+"%~dp0JavaInst.7z" "%~dp0Java%JAVAVER%.exe"rmdir /s /q "%~dp0JRE_ADM"del /f /q "%~dp0JavaInst.7z"mkdir "%~dp0svcpack"copy /b /y "%~dp0Java%JAVAVER%.exe" "%~dp0svcpack\Java%JAVAVER%.exe"call :ENTRIES_INI%SZ% a "%~dp0Java_Runtime_%MAJ%_update_%MIN%_AddOn.zip" "%~dp0ENTRIES_Java.ini" "%~dp0svcpack"del /f /q "%~dp032.cfg"del /f /q "%~dp0ENTRIES_Java.ini"rmdir /s /q "%~dp0svcpack"exit /b :X64set JAVAFILE64=for %%k in (%~dp0jre-*-windows-x64.exe) do call :GETJAVAVER64 %%~nxkif "%JAVAFILE64%"=="" goto :NoJavaInstif not exist "%~dp0bin\ResourcesExtract.exe" goto :NoResExtrfor /f "delims=- tokens=2" %%k in ("%JAVAFILE64%") do set JAVAVER64=%%kSET MAJ=%JAVAVER64:~0,1%SET MIN=%JAVAVER64:~2,3%echo JRE newest version found^: 1.%JAVAVER64%echo Java file name only - %JAVAFN64%if exist "%~dp0JRE_TEMP64" rmdir /s /q "%~dp0JRE_TEMP64"mkdir "%~dp0JRE_TEMP64"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE64%" /DestFolder "%~dp0JRE_TEMP64" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP64\%JAVAFN64%_105_JAVA_INSTALLER.bin" jre64_inst.msi::ren "%~dp0JRE_TEMP64\%JAVAFN64%_103_JAVA_INSTALLER.bin" Data1.cab::del /f /q "%~dp0JRE_TEMP64\%JAVAFN64%*" ECHO.ECHO Launching JRE 64bit to grab msi . . .start "Launching JRE 64bit to grab msi . . ." "%~dp0%JAVAFILE64%":DUAL64BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL64BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP64\jre64_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE64% if exist "%~dp0JRE_ADM64" rmdir /s /q "%~dp0JRE_ADM64"mkdir "%~dp0JRE_ADM64"start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP64\jre64_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADM64"rmdir /s /q "%~dp0JRE_TEMP64"%SZ% a "%~dp0JavaInst-x64.7z" "%~dp0JRE_ADM64\*" -mx=9 -mmt=off -m0=BCJ2 -m1=LZMA:d27:fb=128:mc=256 -m2=LZMA:d24:fb=128:mc=256 -m3=LZMA:d24:fb=128:mc=256 -mb0:1 -mb0s1:2 -mb0s2:3 -rcall :CONFIG_64copy /b /y "%~dp0bin\JavaInst.sfx"+"%~dp064.cfg"+"%~dp0JavaInst-x64.7z" "%~dp0Java%JAVAVER64%-x64.exe"rmdir /s /q "%~dp0JRE_ADM64"del /f /q "%~dp0JavaInst-x64.7z"del /f /q "%~dp064.cfg"mkdir "%~dp0svcpack"copy /b /y "%~dp0Java%JAVAVER64%-x64.exe" "%~dp0svcpack\Java%JAVAVER64%.exe"call :ENTRIES_INI_64%SZ% a "%~dp0Java_Runtime_%MAJ%_update_%MIN%_x64_AddOn.zip" "%~dp0ENTRIES_Java.ini" "%~dp0svcpack"del /f /q "%~dp0ENTRIES_Java.ini"rmdir /s /q "%~dp0svcpack"exit /b :DUALset JAVAFILE=for %%j in (%~dp0jre-*-windows-i586.exe) do call :GETJAVAVER %%~nxjif "%JAVAFILE%"=="" goto :NoJavaInstfor /f "delims=- tokens=2" %%j in ("%JAVAFILE%") do set JAVAVER=%%jSET MAJ=%JAVAVER:~0,1%SET MIN=%JAVAVER:~2,3%echo JRE newest version found^: 1.%JAVAVER%echo Java file name only - %JAVAFN%if exist "%~dp0JRE_TEMP" rmdir /s /q "%~dp0JRE_TEMP"mkdir "%~dp0JRE_TEMP"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE%" /DestFolder "%~dp0JRE_TEMP" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP\%JAVAFN%_101_JAVA_INSTALLER.bin" jre_inst.msi::ren "%~dp0JRE_TEMP\%JAVAFN%_102_JAVA_INSTALLER.bin" Data1.cab::del /f /q "%~dp0JRE_TEMP\%JAVAFN%*" ECHO.ECHO Launching JRE 32bit to grab msi . . .start "Launching JRE 32bit to grab msi . . ." "%~dp0%JAVAFILE%"if exist "%~dp0JRE_ADMAIO" rmdir /s /q "%~dp0JRE_ADMAIO"mkdir "%~dp0JRE_ADMAIO":DUAL32BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL32BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP\jre_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE% start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP\jre_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADMAIO"rmdir /s /q "%~dp0JRE_TEMP" ECHO. set JAVAFILE64=for %%k in (%~dp0jre-*-windows-x64.exe) do call :GETJAVAVER64 %%~nxkif "%JAVAFILE64%"=="" goto :NoJavaInstfor /f "delims=- tokens=2" %%k in ("%JAVAFILE64%") do set JAVAVER64=%%kecho JRE newest version found^: 1.%JAVAVER64%echo Java file name only - %JAVAFN64%if exist "%~dp0JRE_TEMP64" rmdir /s /q "%~dp0JRE_TEMP64"mkdir "%~dp0JRE_TEMP64"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE64%" /DestFolder "%~dp0JRE_TEMP64" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP64\%JAVAFN64%_105_JAVA_INSTALLER.bin" jre64_inst.msi::ren "%~dp0JRE_TEMP64\%JAVAFN64%_103_JAVA_INSTALLER.bin" Data1.cab ECHO.ECHO Launching JRE 64bit to grab msi . . .start "Launching JRE 64bit to grab msi . . ." "%~dp0%JAVAFILE64%":DUAL64BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL64BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP64\jre64_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE64% start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP64\jre64_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADMAIO"rmdir /s /q "%~dp0JRE_TEMP64"%SZ% a "%~dp0JavaInst-AIO.7z" "%~dp0JRE_ADMAIO\*" -mx=9 -mmt=off -m0=BCJ2 -m1=LZMA:d27:fb=128:mc=256 -m2=LZMA:d24:fb=128:mc=256 -m3=LZMA:d24:fb=128:mc=256 -mb0:1 -mb0s1:2 -mb0s2:3 -rcall :CONFIG_AIOcopy /b /y "%~dp0bin\JavaInst.sfx"+"%~dp0AIO.cfg"+"%~dp0JavaInst-AIO.7z" "%~dp0Java%JAVAVER64%-Dual.exe"rmdir /s /q "%~dp0JRE_ADMAIO"del /f /q "%~dp0JavaInst-AIO.7z"del /f /q "%~dp0AIO.cfg"mkdir "%~dp0svcpack"copy /b /y "%~dp0Java%JAVAVER64%-Dual.exe" "%~dp0svcpack\Java%JAVAVER64%.exe"call :ENTRIES_INI_AIO%SZ% a "%~dp0Java_Runtime_%MAJ%_update_%MIN%_Dual_AddOn.zip" "%~dp0ENTRIES_Java.ini" "%~dp0svcpack"del /f /q "%~dp0ENTRIES_Java.ini"rmdir /s /q "%~dp0svcpack"exit /b :CONFIGECHO ;!@Install@!UTF-8!> "%~dp032.cfg"ECHO SetEnvironment="swUninst_x64=HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp032.cfg"ECHO SetEnvironment="swUninst_x86=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp032.cfg"ECHO SetEnvironment="DelOldVer=%%%%P:hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst_%%%%P%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F832[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp032.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% x86">> "%~dp032.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% x86">> "%~dp032.cfg"ECHO BeginPrompt="\n\nThis will install Java %MAJ% Update %MIN% x86 with Web plugins\nAny previous Java x86 version(s) will be uninstalled first\n\n\nAvailable command-line switch:\n\n-ai\tSilent installation with Web plugins\n-ai1\tSilent installation without Web plugins\n\nClick \"OK\" to begin installation. Click \"Cancel\" to exit.">> "%~dp032.cfg"ECHO ExtractTitle="Java SE Runtime Environment %MAJ% Update %MIN% x86">> "%~dp032.cfg"ECHO ExtractDialogText="Please wait while the installation routine is extracted">> "%~dp032.cfg"ECHO FinishMessage="Java SE %MAJ% Update %MIN% x86 has been installed.">> "%~dp032.cfg"ECHO GUIMode="1">> "%~dp032.cfg"ECHO GUIFlags="6153">> "%~dp032.cfg"ECHO MiscFlags="4">> "%~dp032.cfg"ECHO RunProgram="%%DelOldVer%% /qn">> "%~dp032.cfg"ECHO RunProgram="jre_inst.msi /qb!">> "%~dp032.cfg"ECHO RunProgram="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO RunProgram="x64:hidcon:cmd /c \"%programfiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall="%%DelOldVer%% /qn">> "%~dp032.cfg"ECHO AutoInstall="jre_inst.msi /qn">> "%~dp032.cfg"ECHO AutoInstall="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall="x64:hidcon:cmd /c \"%programfiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall1="%%DelOldVer%% /qn">> "%~dp032.cfg"ECHO AutoInstall1="jre_inst.msi /qn WEB_JAVA=0">> "%~dp032.cfg"ECHO AutoInstall1="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall1="x64:hidcon:cmd /c \"%programfiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO ;!@InstallEnd@!>> "%~dp032.cfg"ECHO. >> "%~dp032.cfg"GOTO :EOF :CONFIG_64ECHO ;!@Install@!UTF-8!> "%~dp064.cfg"ECHO SetEnvironment="swUninst=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp064.cfg"ECHO SetEnvironment="DelOldVer64=hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F864[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp064.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% x64">> "%~dp064.cfg"ECHO BeginPrompt="\n\nThis will install Java %MAJ% Update %MIN% x64 with Web plugins\nAny previous Java x64 version(s) will be uninstalled first\n\n\nAvailable command-line switch:\n\n-ai\tSilent installation with Web plugins\n-ai1\tSilent installation without Web plugins\n\nClick \"OK\" to begin installation. Click \"Cancel\" to exit.">> "%~dp064.cfg"ECHO ExtractTitle="Java SE Runtime Environment %MAJ% Update %MIN% x64">> "%~dp064.cfg"ECHO ExtractDialogText="Please wait while the installation routine is extracted">> "%~dp064.cfg"ECHO FinishMessage="Java %MAJ% Update %MIN% x64 has been installed.">> "%~dp064.cfg"ECHO GUIMode="1">> "%~dp064.cfg"ECHO GUIFlags="6153">> "%~dp064.cfg"ECHO MiscFlags="4">> "%~dp064.cfg"ECHO RunProgram="x64:%%DelOldVer64%% /qn">> "%~dp064.cfg"ECHO RunProgram="x64:jre64_inst.msi /qb!">> "%~dp064.cfg"ECHO AutoInstall="x64:%%DelOldVer64%% /qn">> "%~dp064.cfg"ECHO AutoInstall="x64:jre64_inst.msi /qn">> "%~dp064.cfg"ECHO AutoInstall1="x64:%%DelOldVer64%% /qn">> "%~dp064.cfg"ECHO AutoInstall1="x64:jre64_inst.msi /qn WEB_JAVA=0">> "%~dp064.cfg"ECHO ;!@InstallEnd@!>> "%~dp064.cfg"ECHO. >> "%~dp064.cfg"GOTO :EOF :CONFIG_AIOECHO ;!@Install@!UTF-8!> "%~dp0AIO.cfg"ECHO SetEnvironment="swUninst_x64=HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp0AIO.cfg"ECHO SetEnvironment="swUninst_x86=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp0AIO.cfg"ECHO SetEnvironment="DelOldVer=%%%%P:hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst_%%%%P%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F832[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp0AIO.cfg"ECHO SetEnvironment="DelOldVer64=hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst_x86%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F864[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp0AIO.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% DUAL">> "%~dp0AIO.cfg"ECHO BeginPrompt="\n\nThis will install Java %MAJ% Update %MIN% DUAL with Web plugins\nAny previous Java version(s) will be uninstalled first\n\n\nAvailable command-line switch:\n\n-ai\tSilent installation with Web plugins\n-ai1\tSilent installation without Web plugins\n\nClick \"OK\" to begin installation. Click \"Cancel\" to exit.">> "%~dp0AIO.cfg"ECHO ExtractTitle="Java SE Runtime Environment %MAJ% Update %MIN% DUAL">> "%~dp0AIO.cfg"ECHO ExtractDialogText="Please wait while the installation routine is extracted">> "%~dp0AIO.cfg"ECHO FinishMessage="Java %MAJ% Update %MIN% DUAL has been installed.">> "%~dp0AIO.cfg"ECHO GUIMode="1">> "%~dp0AIO.cfg"ECHO GUIFlags="6153">> "%~dp0AIO.cfg"ECHO MiscFlags="4">> "%~dp0AIO.cfg"ECHO RunProgram="%%DelOldVer%% /qn">> "%~dp0AIO.cfg"ECHO RunProgram="x64:%%DelOldVer64%% /qn">> "%~dp0AIO.cfg"ECHO RunProgram="jre_inst.msi /qb!">> "%~dp0AIO.cfg"ECHO RunProgram="x64:jre64_inst.msi /qb!">> "%~dp0AIO.cfg"ECHO RunProgram="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO RunProgram="x64:hidcon:cmd /c \"%ProgramFiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall="%%DelOldVer%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="x64:%%DelOldVer64%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="jre_inst.msi /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="x64:jre64_inst.msi /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall="x64:hidcon:cmd /c \"%ProgramFiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall1="%%DelOldVer%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall1="x64:%%DelOldVer64%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall1="jre_inst.msi /qn WEB_JAVA=0">> "%~dp0AIO.cfg"ECHO AutoInstall1="x64:jre64_inst.msi /qn WEB_JAVA=0">> "%~dp0AIO.cfg"ECHO AutoInstall1="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall1="x64:hidcon:cmd /c \"%ProgramFiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO ;!@InstallEnd@!>> "%~dp0AIO.cfg"ECHO. >> "%~dp0AIO.cfg"GOTO :EOF :ENTRIES_INIECHO [general]> "%~dp0ENTRIES_Java.ini"ECHO builddate=%date%>> "%~dp0ENTRIES_Java.ini"ECHO description=Java SE Runtime Environment %MAJ% update %MIN% x86>> "%~dp0ENTRIES_Java.ini"ECHO language=Multi>> "%~dp0ENTRIES_Java.ini"ECHO version=1.%JAVAVER%>> "%~dp0ENTRIES_Java.ini"ECHO website=http://www.java.com/>>"%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [EditFile]>> "%~dp0ENTRIES_Java.ini"ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [AddProgram]>> "%~dp0ENTRIES_Java.ini"ECHO Java%JAVAVER%.exe -ai>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO ; "Java%JAVAVER%.exe -ai1" for install without Web plugins>> "%~dp0ENTRIES_Java.ini"GOTO :EOF :ENTRIES_INI_64ECHO [general]> "%~dp0ENTRIES_Java.ini"ECHO builddate=%date%>> "%~dp0ENTRIES_Java.ini"ECHO description=Java SE Runtime Environment %MAJ% update %MIN% x64>> "%~dp0ENTRIES_Java.ini"ECHO language=Multi>> "%~dp0ENTRIES_Java.ini"ECHO version=1.%JAVAVER64%>> "%~dp0ENTRIES_Java.ini"ECHO website=http://www.java.com/>>"%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [EditFile]>> "%~dp0ENTRIES_Java.ini"ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [AddProgram]>> "%~dp0ENTRIES_Java.ini"ECHO Java%JAVAVER64%.exe -ai>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO ; "Java%JAVAVER64%.exe -ai1" for install without Web plugins>> "%~dp0ENTRIES_Java.ini"GOTO :EOF :ENTRIES_INI_AIOECHO [general]> "%~dp0ENTRIES_Java.ini"ECHO builddate=%date%>> "%~dp0ENTRIES_Java.ini"ECHO description=Java SE Runtime Environment %MAJ% update %MIN% Dual>> "%~dp0ENTRIES_Java.ini"ECHO language=Multi>> "%~dp0ENTRIES_Java.ini"ECHO version=1.%JAVAVER%_x86 + 1.%JAVAVER64%_x64>> "%~dp0ENTRIES_Java.ini"ECHO website=http://www.java.com/>>"%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [EditFile]>> "%~dp0ENTRIES_Java.ini"ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [AddProgram]>> "%~dp0ENTRIES_Java.ini"ECHO Java%JAVAVER64%.exe -ai>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO ; "Java%JAVAVER64%.exe -ai1" for install without Web plugins>> "%~dp0ENTRIES_Java.ini"GOTO :EOF :GETJAVAVERif /i "%1" GTR "%JAVAFILE%" (set JAVAFILE=%1&&set JAVAFN=%~n1)goto :eof :GETJAVAVER64if /i "%1" GTR "%JAVAFILE64%" (set JAVAFILE64=%1&&set JAVAFN64=%~n1)goto :eof :NoJavaInstecho ================================================================================echo ================================================================================echo. JRE x86 and/or x64 redistributable not found. echo. Place it/them in the same directory than this script.echo. Correct JRE install name for x86 is "jre-XuXX-windows-i586.exe".echo. Correct JRE install name for x64 is "jre-XuXX-windows-x64.exe".echo ================================================================================echo ================================================================================pausegoto :eof :NoResExtrecho ================================================================================echo ================================================================================echo. NirSoft ResourcesExtract not found. Download and unpack it in "bin" directory.echo. Get it here - http://nirsoft.net/utils/resources_extract.htmlecho ================================================================================echo ================================================================================pausegoto :eof :No7zaecho ================================================================================echo ================================================================================echo. 7za.exe not found. Download and unpack it in "bin" directory.echo. Get it here - http://sourceforge.net/projects/sevenzip/files/7-Zip/echo ================================================================================echo ================================================================================pausegoto :eof :No7SFXecho ================================================================================echo ================================================================================echo. JavaInst.sfx not found. Place it in "bin" directory.echo ================================================================================echo ================================================================================pausegoto :eof Edited October 29, 2014 by papageorgiou hamzaaan and stashekmajcherc 2 Quote Link to comment Share on other sites More sharing options...
hamzaaan Posted December 10, 2014 Share Posted December 10, 2014 Here was my solution. I first noticed with 8u20 that the 64bit version when extracted had different file names so the rename commands failed.ren "%~dp0JRE_TEMP64\%JAVAFN64%_101_JAVA_INSTALLER.bin" jre64_inst.msiren "%~dp0JRE_TEMP64\%JAVAFN64%_102_JAVA_INSTALLER.bin" Data1.cab needed to be changed toren "%~dp0JRE_TEMP64\%JAVAFN64%_105_JAVA_INSTALLER.bin" jre64_inst.msiren "%~dp0JRE_TEMP64\%JAVAFN64%_103_JAVA_INSTALLER.bin" Data1.cab Then with 8u25, the files did not extract correctly, so I changed the script (see below) to launch the exe(s) and then grab the msi from the profile temp and then kill the exe(s). It seems to work nicely so far. The lines in bold are where the changes can be found. @echo offsetlocal enableextensionsif not exist "%~dp0bin\7za.exe" goto :No7zaif not exist "%~dp0bin\JavaInst.sfx" goto :No7SFXif not exist "%~dp0bin\ResourcesExtract.exe" goto :NoResExtrSET SZ="%~dp0bin\7za.exe"if exist "%~dp0jre-*-windows-i586.exe" GOTO :X86if not exist "%~dp0jre-*-windows-i586.exe" GOTO :X64 :X86if exist "%~dp0jre-*-windows-x64.exe" GOTO :DUALset JAVAFILE=for %%j in (%~dp0jre-*-windows-i586.exe) do call :GETJAVAVER %%~nxjif "%JAVAFILE%"=="" goto :NoJavaInstfor /f "delims=- tokens=2" %%j in ("%JAVAFILE%") do set JAVAVER=%%jSET MAJ=%JAVAVER:~0,1%SET MIN=%JAVAVER:~2,3%if exist "%~dp0JRE_TEMP" rmdir /s /q "%~dp0JRE_TEMP"mkdir "%~dp0JRE_TEMP"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE%" /DestFolder "%~dp0JRE_TEMP" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP\%JAVAFN%_101_JAVA_INSTALLER.bin" jre_inst.msi::ren "%~dp0JRE_TEMP\%JAVAFN%_102_JAVA_INSTALLER.bin" Data1.cab::del /f /q "%~dp0JRE_TEMP\%JAVAFN%*" ECHO.ECHO Launching JRE 32bit to grab msi . . .start "Launching JRE 32bit to grab msi . . ." "%~dp0%JAVAFILE%"if exist "%~dp0JRE_ADMAIO" rmdir /s /q "%~dp0JRE_ADMAIO"mkdir "%~dp0JRE_ADMAIO":DUAL32BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL32BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP\jre_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE% start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP\jre_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADM"rmdir /s /q "%~dp0JRE_TEMP"%SZ% a "%~dp0JavaInst.7z" "%~dp0JRE_ADM\*" -mx=9 -mmt=off -m0=BCJ2 -m1=LZMA:d27:fb=128:mc=256 -m2=LZMA:d24:fb=128:mc=256 -m3=LZMA:d24:fb=128:mc=256 -mb0:1 -mb0s1:2 -mb0s2:3 -rcall :CONFIGcopy /b /y "%~dp0bin\JavaInst.sfx"+"%~dp032.cfg"+"%~dp0JavaInst.7z" "%~dp0Java%JAVAVER%.exe"rmdir /s /q "%~dp0JRE_ADM"del /f /q "%~dp0JavaInst.7z"mkdir "%~dp0svcpack"copy /b /y "%~dp0Java%JAVAVER%.exe" "%~dp0svcpack\Java%JAVAVER%.exe"call :ENTRIES_INI%SZ% a "%~dp0Java_Runtime_%MAJ%_update_%MIN%_AddOn.zip" "%~dp0ENTRIES_Java.ini" "%~dp0svcpack"del /f /q "%~dp032.cfg"del /f /q "%~dp0ENTRIES_Java.ini"rmdir /s /q "%~dp0svcpack"exit /b :X64set JAVAFILE64=for %%k in (%~dp0jre-*-windows-x64.exe) do call :GETJAVAVER64 %%~nxkif "%JAVAFILE64%"=="" goto :NoJavaInstif not exist "%~dp0bin\ResourcesExtract.exe" goto :NoResExtrfor /f "delims=- tokens=2" %%k in ("%JAVAFILE64%") do set JAVAVER64=%%kSET MAJ=%JAVAVER64:~0,1%SET MIN=%JAVAVER64:~2,3%echo JRE newest version found^: 1.%JAVAVER64%echo Java file name only - %JAVAFN64%if exist "%~dp0JRE_TEMP64" rmdir /s /q "%~dp0JRE_TEMP64"mkdir "%~dp0JRE_TEMP64"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE64%" /DestFolder "%~dp0JRE_TEMP64" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP64\%JAVAFN64%_105_JAVA_INSTALLER.bin" jre64_inst.msi::ren "%~dp0JRE_TEMP64\%JAVAFN64%_103_JAVA_INSTALLER.bin" Data1.cab::del /f /q "%~dp0JRE_TEMP64\%JAVAFN64%*" ECHO.ECHO Launching JRE 64bit to grab msi . . .start "Launching JRE 64bit to grab msi . . ." "%~dp0%JAVAFILE64%":DUAL64BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL64BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP64\jre64_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE64% if exist "%~dp0JRE_ADM64" rmdir /s /q "%~dp0JRE_ADM64"mkdir "%~dp0JRE_ADM64"start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP64\jre64_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADM64"rmdir /s /q "%~dp0JRE_TEMP64"%SZ% a "%~dp0JavaInst-x64.7z" "%~dp0JRE_ADM64\*" -mx=9 -mmt=off -m0=BCJ2 -m1=LZMA:d27:fb=128:mc=256 -m2=LZMA:d24:fb=128:mc=256 -m3=LZMA:d24:fb=128:mc=256 -mb0:1 -mb0s1:2 -mb0s2:3 -rcall :CONFIG_64copy /b /y "%~dp0bin\JavaInst.sfx"+"%~dp064.cfg"+"%~dp0JavaInst-x64.7z" "%~dp0Java%JAVAVER64%-x64.exe"rmdir /s /q "%~dp0JRE_ADM64"del /f /q "%~dp0JavaInst-x64.7z"del /f /q "%~dp064.cfg"mkdir "%~dp0svcpack"copy /b /y "%~dp0Java%JAVAVER64%-x64.exe" "%~dp0svcpack\Java%JAVAVER64%.exe"call :ENTRIES_INI_64%SZ% a "%~dp0Java_Runtime_%MAJ%_update_%MIN%_x64_AddOn.zip" "%~dp0ENTRIES_Java.ini" "%~dp0svcpack"del /f /q "%~dp0ENTRIES_Java.ini"rmdir /s /q "%~dp0svcpack"exit /b :DUALset JAVAFILE=for %%j in (%~dp0jre-*-windows-i586.exe) do call :GETJAVAVER %%~nxjif "%JAVAFILE%"=="" goto :NoJavaInstfor /f "delims=- tokens=2" %%j in ("%JAVAFILE%") do set JAVAVER=%%jSET MAJ=%JAVAVER:~0,1%SET MIN=%JAVAVER:~2,3%echo JRE newest version found^: 1.%JAVAVER%echo Java file name only - %JAVAFN%if exist "%~dp0JRE_TEMP" rmdir /s /q "%~dp0JRE_TEMP"mkdir "%~dp0JRE_TEMP"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE%" /DestFolder "%~dp0JRE_TEMP" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP\%JAVAFN%_101_JAVA_INSTALLER.bin" jre_inst.msi::ren "%~dp0JRE_TEMP\%JAVAFN%_102_JAVA_INSTALLER.bin" Data1.cab::del /f /q "%~dp0JRE_TEMP\%JAVAFN%*" ECHO.ECHO Launching JRE 32bit to grab msi . . .start "Launching JRE 32bit to grab msi . . ." "%~dp0%JAVAFILE%"if exist "%~dp0JRE_ADMAIO" rmdir /s /q "%~dp0JRE_ADMAIO"mkdir "%~dp0JRE_ADMAIO":DUAL32BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL32BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP\jre_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE% start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP\jre_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADMAIO"rmdir /s /q "%~dp0JRE_TEMP" ECHO. set JAVAFILE64=for %%k in (%~dp0jre-*-windows-x64.exe) do call :GETJAVAVER64 %%~nxkif "%JAVAFILE64%"=="" goto :NoJavaInstfor /f "delims=- tokens=2" %%k in ("%JAVAFILE64%") do set JAVAVER64=%%kecho JRE newest version found^: 1.%JAVAVER64%echo Java file name only - %JAVAFN64%if exist "%~dp0JRE_TEMP64" rmdir /s /q "%~dp0JRE_TEMP64"mkdir "%~dp0JRE_TEMP64"::start /w "Unpacking JRE..." "%~dp0bin\ResourcesExtract.exe" /Source "%~dp0%JAVAFILE64%" /DestFolder "%~dp0JRE_TEMP64" /ExtractIcons 0 /ExtractCursors 0 /ExtractBitmaps 0 /ExtractHTML 0 /ExtractManifests 0 /ExtractAnimatedIcons 0 /ExtractAnimatedCursors 0 /ExtractAVI 0 /ExtractTypeLib 0 /ExtractBinary 1 /ScanSubFolders 0 /FileExistMode 1 /OpenDestFolder 0::ren "%~dp0JRE_TEMP64\%JAVAFN64%_105_JAVA_INSTALLER.bin" jre64_inst.msi::ren "%~dp0JRE_TEMP64\%JAVAFN64%_103_JAVA_INSTALLER.bin" Data1.cab ECHO.ECHO Launching JRE 64bit to grab msi . . .start "Launching JRE 64bit to grab msi . . ." "%~dp0%JAVAFILE64%":DUAL64BITLOOPIF NOT EXIST "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" GOTO :DUAL64BITLOOPping -n 10 127.0.0.1>nulcopy "%USERPROFILE%\AppData\LocalLow\Sun\Java\jre1.%MAJ%.0_%MIN%_x64\jre1.%MAJ%.0_%MIN%.msi" "%~dp0JRE_TEMP64\jre64_inst.msi"ping -n 2 127.0.0.1>nulTASKKILL /F /IM %JAVAFILE64% start /w "Creating administrative installation point..." msiexec /a "%~dp0JRE_TEMP64\jre64_inst.msi" /qb! TARGETDIR="%~dp0JRE_ADMAIO"rmdir /s /q "%~dp0JRE_TEMP64"%SZ% a "%~dp0JavaInst-AIO.7z" "%~dp0JRE_ADMAIO\*" -mx=9 -mmt=off -m0=BCJ2 -m1=LZMA:d27:fb=128:mc=256 -m2=LZMA:d24:fb=128:mc=256 -m3=LZMA:d24:fb=128:mc=256 -mb0:1 -mb0s1:2 -mb0s2:3 -rcall :CONFIG_AIOcopy /b /y "%~dp0bin\JavaInst.sfx"+"%~dp0AIO.cfg"+"%~dp0JavaInst-AIO.7z" "%~dp0Java%JAVAVER64%-Dual.exe"rmdir /s /q "%~dp0JRE_ADMAIO"del /f /q "%~dp0JavaInst-AIO.7z"del /f /q "%~dp0AIO.cfg"mkdir "%~dp0svcpack"copy /b /y "%~dp0Java%JAVAVER64%-Dual.exe" "%~dp0svcpack\Java%JAVAVER64%.exe"call :ENTRIES_INI_AIO%SZ% a "%~dp0Java_Runtime_%MAJ%_update_%MIN%_Dual_AddOn.zip" "%~dp0ENTRIES_Java.ini" "%~dp0svcpack"del /f /q "%~dp0ENTRIES_Java.ini"rmdir /s /q "%~dp0svcpack"exit /b :CONFIGECHO ;!@Install@!UTF-8!> "%~dp032.cfg"ECHO SetEnvironment="swUninst_x64=HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp032.cfg"ECHO SetEnvironment="swUninst_x86=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp032.cfg"ECHO SetEnvironment="DelOldVer=%%%%P:hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst_%%%%P%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F832[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp032.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% x86">> "%~dp032.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% x86">> "%~dp032.cfg"ECHO BeginPrompt="\n\nThis will install Java %MAJ% Update %MIN% x86 with Web plugins\nAny previous Java x86 version(s) will be uninstalled first\n\n\nAvailable command-line switch:\n\n-ai\tSilent installation with Web plugins\n-ai1\tSilent installation without Web plugins\n\nClick \"OK\" to begin installation. Click \"Cancel\" to exit.">> "%~dp032.cfg"ECHO ExtractTitle="Java SE Runtime Environment %MAJ% Update %MIN% x86">> "%~dp032.cfg"ECHO ExtractDialogText="Please wait while the installation routine is extracted">> "%~dp032.cfg"ECHO FinishMessage="Java SE %MAJ% Update %MIN% x86 has been installed.">> "%~dp032.cfg"ECHO GUIMode="1">> "%~dp032.cfg"ECHO GUIFlags="6153">> "%~dp032.cfg"ECHO MiscFlags="4">> "%~dp032.cfg"ECHO RunProgram="%%DelOldVer%% /qn">> "%~dp032.cfg"ECHO RunProgram="jre_inst.msi /qb!">> "%~dp032.cfg"ECHO RunProgram="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO RunProgram="x64:hidcon:cmd /c \"%programfiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall="%%DelOldVer%% /qn">> "%~dp032.cfg"ECHO AutoInstall="jre_inst.msi /qn">> "%~dp032.cfg"ECHO AutoInstall="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall="x64:hidcon:cmd /c \"%programfiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall1="%%DelOldVer%% /qn">> "%~dp032.cfg"ECHO AutoInstall1="jre_inst.msi /qn WEB_JAVA=0">> "%~dp032.cfg"ECHO AutoInstall1="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO AutoInstall1="x64:hidcon:cmd /c \"%programfiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp032.cfg"ECHO ;!@InstallEnd@!>> "%~dp032.cfg"ECHO. >> "%~dp032.cfg"GOTO :EOF :CONFIG_64ECHO ;!@Install@!UTF-8!> "%~dp064.cfg"ECHO SetEnvironment="swUninst=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp064.cfg"ECHO SetEnvironment="DelOldVer64=hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F864[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp064.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% x64">> "%~dp064.cfg"ECHO BeginPrompt="\n\nThis will install Java %MAJ% Update %MIN% x64 with Web plugins\nAny previous Java x64 version(s) will be uninstalled first\n\n\nAvailable command-line switch:\n\n-ai\tSilent installation with Web plugins\n-ai1\tSilent installation without Web plugins\n\nClick \"OK\" to begin installation. Click \"Cancel\" to exit.">> "%~dp064.cfg"ECHO ExtractTitle="Java SE Runtime Environment %MAJ% Update %MIN% x64">> "%~dp064.cfg"ECHO ExtractDialogText="Please wait while the installation routine is extracted">> "%~dp064.cfg"ECHO FinishMessage="Java %MAJ% Update %MIN% x64 has been installed.">> "%~dp064.cfg"ECHO GUIMode="1">> "%~dp064.cfg"ECHO GUIFlags="6153">> "%~dp064.cfg"ECHO MiscFlags="4">> "%~dp064.cfg"ECHO RunProgram="x64:%%DelOldVer64%% /qn">> "%~dp064.cfg"ECHO RunProgram="x64:jre64_inst.msi /qb!">> "%~dp064.cfg"ECHO AutoInstall="x64:%%DelOldVer64%% /qn">> "%~dp064.cfg"ECHO AutoInstall="x64:jre64_inst.msi /qn">> "%~dp064.cfg"ECHO AutoInstall1="x64:%%DelOldVer64%% /qn">> "%~dp064.cfg"ECHO AutoInstall1="x64:jre64_inst.msi /qn WEB_JAVA=0">> "%~dp064.cfg"ECHO ;!@InstallEnd@!>> "%~dp064.cfg"ECHO. >> "%~dp064.cfg"GOTO :EOF :CONFIG_AIOECHO ;!@Install@!UTF-8!> "%~dp0AIO.cfg"ECHO SetEnvironment="swUninst_x64=HKLM\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp0AIO.cfg"ECHO SetEnvironment="swUninst_x86=HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall">> "%~dp0AIO.cfg"ECHO SetEnvironment="DelOldVer=%%%%P:hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst_%%%%P%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F832[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp0AIO.cfg"ECHO SetEnvironment="DelOldVer64=hidcon:cmd /c For /F \"tokens=2 delims={}\" %%a In ('Reg Query %%swUninst_x86%% ^| FINDSTR \"{26A24AE4-039D-4CA4-87B4-2F864[0-9A-F]*}\"') Do MsiExec /x{%%a}">> "%~dp0AIO.cfg"ECHO Title="Java SE Runtime Environment %MAJ% Update %MIN% DUAL">> "%~dp0AIO.cfg"ECHO BeginPrompt="\n\nThis will install Java %MAJ% Update %MIN% DUAL with Web plugins\nAny previous Java version(s) will be uninstalled first\n\n\nAvailable command-line switch:\n\n-ai\tSilent installation with Web plugins\n-ai1\tSilent installation without Web plugins\n\nClick \"OK\" to begin installation. Click \"Cancel\" to exit.">> "%~dp0AIO.cfg"ECHO ExtractTitle="Java SE Runtime Environment %MAJ% Update %MIN% DUAL">> "%~dp0AIO.cfg"ECHO ExtractDialogText="Please wait while the installation routine is extracted">> "%~dp0AIO.cfg"ECHO FinishMessage="Java %MAJ% Update %MIN% DUAL has been installed.">> "%~dp0AIO.cfg"ECHO GUIMode="1">> "%~dp0AIO.cfg"ECHO GUIFlags="6153">> "%~dp0AIO.cfg"ECHO MiscFlags="4">> "%~dp0AIO.cfg"ECHO RunProgram="%%DelOldVer%% /qn">> "%~dp0AIO.cfg"ECHO RunProgram="x64:%%DelOldVer64%% /qn">> "%~dp0AIO.cfg"ECHO RunProgram="jre_inst.msi /qb!">> "%~dp0AIO.cfg"ECHO RunProgram="x64:jre64_inst.msi /qb!">> "%~dp0AIO.cfg"ECHO RunProgram="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO RunProgram="x64:hidcon:cmd /c \"%ProgramFiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall="%%DelOldVer%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="x64:%%DelOldVer64%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="jre_inst.msi /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="x64:jre64_inst.msi /qn">> "%~dp0AIO.cfg"ECHO AutoInstall="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall="x64:hidcon:cmd /c \"%ProgramFiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall1="%%DelOldVer%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall1="x64:%%DelOldVer64%% /qn">> "%~dp0AIO.cfg"ECHO AutoInstall1="jre_inst.msi /qn WEB_JAVA=0">> "%~dp0AIO.cfg"ECHO AutoInstall1="x64:jre64_inst.msi /qn WEB_JAVA=0">> "%~dp0AIO.cfg"ECHO AutoInstall1="x86:hidcon:cmd /c \"%programfiles%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO AutoInstall1="x64:hidcon:cmd /c \"%ProgramFiles(x86)%\\Java\\jre%MAJ%\\bin\\jqs.exe\" -unregister">> "%~dp0AIO.cfg"ECHO ;!@InstallEnd@!>> "%~dp0AIO.cfg"ECHO. >> "%~dp0AIO.cfg"GOTO :EOF :ENTRIES_INIECHO [general]> "%~dp0ENTRIES_Java.ini"ECHO builddate=%date%>> "%~dp0ENTRIES_Java.ini"ECHO description=Java SE Runtime Environment %MAJ% update %MIN% x86>> "%~dp0ENTRIES_Java.ini"ECHO language=Multi>> "%~dp0ENTRIES_Java.ini"ECHO version=1.%JAVAVER%>> "%~dp0ENTRIES_Java.ini"ECHO website=http://www.java.com/>>"%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [EditFile]>> "%~dp0ENTRIES_Java.ini"ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [AddProgram]>> "%~dp0ENTRIES_Java.ini"ECHO Java%JAVAVER%.exe -ai>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO ; "Java%JAVAVER%.exe -ai1" for install without Web plugins>> "%~dp0ENTRIES_Java.ini"GOTO :EOF :ENTRIES_INI_64ECHO [general]> "%~dp0ENTRIES_Java.ini"ECHO builddate=%date%>> "%~dp0ENTRIES_Java.ini"ECHO description=Java SE Runtime Environment %MAJ% update %MIN% x64>> "%~dp0ENTRIES_Java.ini"ECHO language=Multi>> "%~dp0ENTRIES_Java.ini"ECHO version=1.%JAVAVER64%>> "%~dp0ENTRIES_Java.ini"ECHO website=http://www.java.com/>>"%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [EditFile]>> "%~dp0ENTRIES_Java.ini"ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [AddProgram]>> "%~dp0ENTRIES_Java.ini"ECHO Java%JAVAVER64%.exe -ai>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO ; "Java%JAVAVER64%.exe -ai1" for install without Web plugins>> "%~dp0ENTRIES_Java.ini"GOTO :EOF :ENTRIES_INI_AIOECHO [general]> "%~dp0ENTRIES_Java.ini"ECHO builddate=%date%>> "%~dp0ENTRIES_Java.ini"ECHO description=Java SE Runtime Environment %MAJ% update %MIN% Dual>> "%~dp0ENTRIES_Java.ini"ECHO language=Multi>> "%~dp0ENTRIES_Java.ini"ECHO version=1.%JAVAVER%_x86 + 1.%JAVAVER64%_x64>> "%~dp0ENTRIES_Java.ini"ECHO website=http://www.java.com/>>"%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [EditFile]>> "%~dp0ENTRIES_Java.ini"ECHO I386\SVCPACK.INF,SetupHotfixesToRun,AddProgram>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO [AddProgram]>> "%~dp0ENTRIES_Java.ini"ECHO Java%JAVAVER64%.exe -ai>> "%~dp0ENTRIES_Java.ini"ECHO. >> "%~dp0ENTRIES_Java.ini"ECHO ; "Java%JAVAVER64%.exe -ai1" for install without Web plugins>> "%~dp0ENTRIES_Java.ini"GOTO :EOF :GETJAVAVERif /i "%1" GTR "%JAVAFILE%" (set JAVAFILE=%1&&set JAVAFN=%~n1)goto :eof :GETJAVAVER64if /i "%1" GTR "%JAVAFILE64%" (set JAVAFILE64=%1&&set JAVAFN64=%~n1)goto :eof :NoJavaInstecho ================================================================================echo ================================================================================echo. JRE x86 and/or x64 redistributable not found. echo. Place it/them in the same directory than this script.echo. Correct JRE install name for x86 is "jre-XuXX-windows-i586.exe".echo. Correct JRE install name for x64 is "jre-XuXX-windows-x64.exe".echo ================================================================================echo ================================================================================pausegoto :eof :NoResExtrecho ================================================================================echo ================================================================================echo. NirSoft ResourcesExtract not found. Download and unpack it in "bin" directory.echo. Get it here - http://nirsoft.net/utils/resources_extract.htmlecho ================================================================================echo ================================================================================pausegoto :eof :No7zaecho ================================================================================echo ================================================================================echo. 7za.exe not found. Download and unpack it in "bin" directory.echo. Get it here - http://sourceforge.net/projects/sevenzip/files/7-Zip/echo ================================================================================echo ================================================================================pausegoto :eof :No7SFXecho ================================================================================echo ================================================================================echo. JavaInst.sfx not found. Place it in "bin" directory.echo ================================================================================echo ================================================================================pausegoto :eofmake this in cmd please..!! :crying_anim02: Quote Link to comment Share on other sites More sharing options...
skrell Posted December 27, 2014 Share Posted December 27, 2014 @hamzaaan: I don't understand your comment? How is a cmd different than a bat file? Can't i just copy and paste this text into a file and save it as a batch and run it like the cmd in the OP? Quote Link to comment Share on other sites More sharing options...
stashekmajcherc Posted December 28, 2014 Share Posted December 28, 2014 @hamzaaan: I don't understand your comment? How is a cmd different than a bat file? Can't i just copy and paste this text into a file and save it as a batch and run it like the cmd in the OP? Yes you can!! Dont worry! I made it a long time ago.The only problem is that Im not able to create dula(86-64) silent instalation of Java 8.25 Quote Link to comment Share on other sites More sharing options...
skrell Posted December 28, 2014 Share Posted December 28, 2014 @hamzaaan: I don't understand your comment? How is a cmd different than a bat file? Can't i just copy and paste this text into a file and save it as a batch and run it like the cmd in the OP? Yes you can!! Dont worry! I made it a long time ago.The only problem is that Im not able to create dula(86-64) silent instalation of Java 8.25 Will this work on XP? Quote Link to comment Share on other sites More sharing options...
mooms Posted December 28, 2014 Author Share Posted December 28, 2014 Will this work on XP?Java 8 don't run on XP. Quote Link to comment Share on other sites More sharing options...
bphlpt Posted December 28, 2014 Share Posted December 28, 2014 @mooms, so what you said here - http://www.wincert.net/forum/topic/11774-java-multi-maker-addon-sfx-x86-x64/?p=106450 - is not true after all? Cheers and Regards Quote Link to comment Share on other sites More sharing options...
mooms Posted December 29, 2014 Author Share Posted December 29, 2014 @bphlpt: Indeed, at that time I had just tested the install (it worked) but Java 8 itself don't run on XP.I have edited the post to state this. Quote Link to comment Share on other sites More sharing options...
mooms Posted December 29, 2014 Author Share Posted December 29, 2014 New version, updated (with the help of papageorgiou) to be used with Java 8u20 and newer.See first post. Quote Link to comment Share on other sites More sharing options...
mooms Posted January 2, 2015 Author Share Posted January 2, 2015 Version 2.0 of the maker, what's new:- The script will offer the choice of the version (x86, x64, or both).- The script will automatically download the newest version(s) of JRE (only if the setup(s) are not already in the folder, so no unnecessary download).- The script can still be used offline if you have put the setup(s) in the same folder.- Fix: previous Java version(s) correctly uninstalled.- The default install is without Web plugins Quote Link to comment Share on other sites More sharing options...
Thiersee Posted January 2, 2015 Share Posted January 2, 2015 Hi mooms, Version 2.0 of the maker, what's new: 1) In the english batch-file there is a small section still in french: :NoJavaInstecho ================================================================================echo ================================================================================echo. L'installateur Java x86 et/ou x64 est introuvableecho. Plachez-le(s) dans le même dossier que ce scriptecho. Le nom correct pour les versions x86 est "jre-XuXX-windows-i586.exe".echo. Le nom correct pour les versions x64 est "jre-XuXX-windows-x64.exe".echo ================================================================================echo ================================================================================pausegoto :eof 2) If I start the maker on a system, where the actual version is already installed, I get a small error-warning that a newer version is already installed on the system; this warning disappears on his own. Regards, Thiersee BTW: Happy New Year! :beerchug: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.