Jump to content

Java Multi Maker


mooms

Recommended Posts

If I build the dual-installer with Java-Multi-Maker_2.5 the size is ~ 98MB it was so already with Java 8u51);

if I build it with your test-version 2.6 the size is ~ 44 MB!

Both version of the dual-installer works.

Hi Thiersee,

Yes the size gain was the purpose of the v2.6

The cons:

- You need to use a 64 bits OS to build 64 bits versions (the installer is run in a special mode to make the admin install point).

- It seems some unique infos are added in the admin install, because every installer have an unique MD5.

 

I install it in two ways:

1) With WPI for my italian Install-DVD

2) With WTK (SFX-Installers) for the german Install.

In both cases the Java-Dual-Installer is in an AIO for Sytem Files.

Thiersee

That's the confirmation: Oracle have made some changes to the installers that will make them incompatible with setupcomplete installs.

I also remember now this was already discussed in the ryanVM thread (you need to be logged to see the thread).

Link to comment
Share on other sites

  • 2 weeks later...

Hi mooms,

I'll try to explain the situation that I get into and maybe you'll find a solution for this to not happen anymore. Anyway I fixed my problem and I'll tell you how.

So here it is: On the system was 8u40 (x86/x64) version installed with your Dual installer. No problem so far.

When the new version 8u60 was released the nag screen appeared and I chose to update than the installer wanted to uninstall the old version. It said it was succesfull uninstalation.

Now comes the tricky part. From time to time the nag screen wants to uninstall the old version again and again. Only that it not finds the file that it needs to run the uninstall.

Since it was nagging me I started to look to fix it. I tried to uninstall from Control panel with no success, the same missing file. Without it it will not uninstall. I searched for the exact older version to try use it to uninstall. No success. I tried the Java uninstall tool and JavaRa, still no success.

Even if the new installers have the ability to remove the old versions I was unable to remove the old version.

I looked over to the path where it seeks for the file and it points to ...AppData\Local\Temp\7ZipSfx.000\ than it flashed to my mind to extract the original installer to that folder.

I was deleting the Temp folders so I had to recreate the path. Now I found that the name of the file was not the same. I renamed the temp file than the uninstall was completed succesfully and the old version finally was gone.

Now I kindly ask you (and dare you :) ). Can you make the SFX_installer to replicate the original setup Temp path and names so this will not happen anymore?

Thank you!

Link to comment
Share on other sites

Hi ianymaty,

Found the path, it is a variable, based on the user name and file version:

For an user named ianymaty and Java 8u60 it is:
 

C:\Users\ianymaty\AppData\LocalLow\Oracle\Java\jre1.8.0_60

Translated into variables:

%USERPROFILE%\AppData\LocalLow\Oracle\Java\jre1.%MAJ%.0_%MIN%

(%MAJ% and %MIN% are variables created by my script based on the file name, we reuse them here).

Translated into 7 zip SFX syntax:

InstallPath="%USERPROFILE%\\AppData\\LocalLow\\Oracle\\Java\\jre1.%MAJ%.0_%MIN%"

 
in the cmd file:

ECHO InstallPath="%%USERPROFILE%%\\AppData\\LocalLow\\Oracle\\Java\\jre1.%MAJ%.0_%MIN%">> "32.cfg"

You may have noticed that the variable USERPROFILE is surrounded by double %% sign, that's because we don't want Windows parsing the variable when running the CMD file, but when the SFX is executed, and using double %% will do the trick.
 

This is working, but, on my tests, the install isn't silent anymore on Win7 X64 (but it is silent on Win7 x86).
I don't know why, maybe because of the path used ? That's weird...
 
You can test it:
 
JAVA-Multi_Maker_2.6-test2.zip
MD5: d004e85736501093ebe1cc90e92a03a8
 
 
edit: discovered that the extraction path is different for x64: _x64 is added at the end of the folder's name...
code used is:

%USERPROFILE%\AppData\LocalLow\Oracle\Java\jre1.%MAJ64%.0_%MIN64%_x64

I made an other test version
It is slightly different because we need two separate folders, and 7zip can only extract to one folder, so we use this extraction path

InstallPath="%USERPROFILE%\\AppData\\LocalLow\\Oracle\\Java"

I also changed the naming of the msi files, now it mimic exactly the behavior of the original installer as you have requested, but the problem still remains....
The compression of the admin install version is also much less efficient because of the separate folders.
 
JAVA-Multi_Maker_2.6-test3.zip
MD5: 30af3563e0c53c7c9fd7be350d39986f

I'm surely missing something here...

Link to comment
Share on other sites

I've found the reason:

http://superuser.com/questions/134245/disable-windows-7-s-open-file-security-warning-dialog-for-exe-on-local-drive

http://www.windowspcguy.net/?p=173

http://www.makeuseof.com/answers/type-data-stored-local-locallow-roaming-folders-userappdata-windows-7/

 

TL;DR: It appears the LocalLow folder is a special folder for untrusted data, so Windows will always ask for run confirmation from here, and AFAIK there is no easy and automatic way to bypass it.

 

Anyway, I was not able to reproduce your bug:

I installed silent Java 8u40 Dual made with Java Multi Maker 2.5, then updated with original 8u60 installers, and Java was able to uninstall both versions of 8u40.

Link to comment
Share on other sites

7zip SFX always delete the temp folder once finished.
(not the case of course if InstallPath= is used).
 
But, as I said, even without the original setup files the uninstall went fine, so I don't know why ianymaty had encountered this bug.
 
Reminder: uninstall strings for Java 8u60:
x86:
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218060F0}
 
x64:
MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418060F0}

 

Only the part in bold changes between versions.

Link to comment
Share on other sites

Anyway, I was not able to reproduce your bug:

I installed silent Java 8u40 Dual made with Java Multi Maker 2.5, then updated with original 8u60 installers, and Java was able to uninstall both versions of 8u40.

 

 

I was deleting the Temp folders

This is a problem!

Some SFX-installers leave the install/uninstall file in the temp-folders, so if you delete those temp-SFX-folders....

I got the same bug for other programs.

 

7zip SFX always delete the temp folder once finished.

(not the case of course if InstallPath= is used).

 

But, as I said, even without the original setup files the uninstall went fine, so I don't know why ianymaty had encountered this bug.

 

Reminder: uninstall strings for Java 8u60:

x86:

MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F83218060F0}

 

x64:

MsiExec.exe /X{26A24AE4-039D-4CA4-87B4-2F86418060F0}

 

Only the part in bold changes between versions.

It pretend it uninstalled succesfully once. After that the nag to uninstall older version came up so than was it searching for the missing file.

That is I believe that I already had installed the same version by the original setup files and the same version by the Dual installer that was pointing to other location of the setup files. The first uninstall was succesful because it was removing the original installation. The other attempts to uninstall came up with the missing file because I was clearing the Temp folders and the files were missing. The file that was looking for I think was "jre_inst.msi" and "jre64_inst.msi" There are not the original names of the installers so that is why I had to recreate the path and names for them to be able to compleatly remove and uninstall them.

mooms, thank you to look into this and try to explain but all that info from previous posts are too technical for me I'm affraid.

So try this experiment: Install by Dual installer than clear AppData\Local\Temp\7ZipSfx.000\ than try to uninstall by Control panel. See what happens.

I was suggesting to keep the original Temp path and names if it is possible so this will not happen anymore.

As long as we can always make separate files for x86 and x64 I don't mind if the Dual installer is bigger as long as it replicates what the original installer does.

Thank you.

Link to comment
Share on other sites

So try this experiment: Install by Dual installer than clear AppData\Local\Temp\7ZipSfx.000\ than try to uninstall by Control panel. See what happens.

That's what I've tried (twice), and I was able to uninstall the previous version (double checked, rebooted, no nag, no traces left of 8u40).

As i said, the local folder is immediately deleted by the 7zip SFX.

You're the only one who have reported this bug, so I'm thinking the problem lies on your end.

 

 

I was suggesting to keep the original Temp path and names if it is possible so this will not happen anymore.

As long as we can always make separate files for x86 and x64 I don't mind if the Dual installer is bigger as long as it replicates what the original installer does.

 

now it mimic exactly the behavior of the original installer as you have requested

This is what 2.6-test3 is doing (you can at least try it, it was made after your request), but another (bigger) problem have arisen as I have explained (installation is not silent anymore, defeating the whole purpose of the maker....)
Link to comment
Share on other sites

Its the sfx module that was the cause of the false positive (because it was compressed with UPX).
What is weird is that the file haven't changed since v2.1, Mediafire "virus" detection is a joke....

V2.6.1 is out, only change:
- uncompressed the SFX stub to avoid false positive.
(No need to update if you have v2.6).

Link to comment
Share on other sites

  • 5 weeks later...

Hi Mooms,

 

this time no issues, only a couple of questions ;).

 

In your script the download is set to java.com and javadl.sun.com

 

It's normally the same as on Oracle http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html#javasejdk

but this time there are two versions on oracle.com, jre-8u65 and jre-8.66 (same build 17)....

 

I commented out (:: ) all the lines related to download and put the downloaded files -u66 in the folder of JavaMultiMaker; starting the modified script the dual-installer is normally build and works.

 

Can you consider to add an option to choose between the download links or to ask for downloading/not downloading?

 

Thanks a lot, Thiersee

Edited by Thiersee
Link to comment
Share on other sites

Hi Thiersee
 
The downloader part was Strych9's work, I used his code with very little modification.

The script is already working with local files (offline mode), no need to comment the lines, the script will always process the latest installer(s) found in the work directory, that means that if you put 8u66 installer(s) in, the script will download 8u65 but will process 8u66.

 

I can add a direct offline mode with the help of yet another question, but it will add an other layer of complexity, both for me and the users, you can simply temporary disconnect for the Internet or block curl.exe with your firewall to achieve this.

Link to comment
Share on other sites

.....

The script is already working with local files (offline mode), no need to comment the lines, the script will always process the latest installer(s) found in the work directory, that means that if you put 8u66 installer(s) in, the script will download 8u65 but will process 8u66.

.....

Thanks, I didn't try it before, it works and it's enough.

 

 

I can add a direct offline mode with the help of yet another question........

Exactly that, what I tried today without results :D !

 

Regards, Thiersee

Link to comment
Share on other sites

Hi mooms.

No problems here, just some questions...

1. What happens that after the process the original installer file is bigger than before the process? Someway it is altered. It only happens with x86 version and not with x64.

2. Would you consider to name the final file to mimic with other SFX installer names? Something with SFX_ prefix (SFX_jre-8u65-windows-i586.exe).

Thank you.

Link to comment
Share on other sites

...

1. What happens that after the process the original installer file is bigger than before the process? Someway it is altered. It only happens with x86 version and not with x64.

.....

I can confirm it: just after it finished the x64-download the x86 changes suddenly from 48956 KB to 50495 KB and stays with this size.

 

Regards, Thiersee

Link to comment
Share on other sites

Hi mooms.

No problems here, just some questions...

1. What happens that after the process the original installer file is bigger than before the process? Someway it is altered. It only happens with x86 version and not with x64.

I can confirm it: just after it finished the x64-download the x86 changes suddenly from 48956 KB to 50495 KB and stays with this size.

Regards, Thiersee

The x86 installer is compressed with UPX, we need to uncompress it to be able to extract the MSI inside (the actual installer), and achieve (much) better compression, especially with admin install point.

Side-effect: digital signature is lost on the uncompressed installer, but the actual installer (the MSI) is unaltered and still digitally signed, you can check by extracting the SFX.

 

 

 

 

2. Would you consider to name the final file to mimic with other SFX installer names? Something with SFX_ prefix (SFX_jre-8u65-windows-i586.exe).

Thank you.

2. You can easily modify the script yourself, the final names are made from two three lines

Replace line 72 for the x86 installer:

copy /b /y ".\bin\JavaInst.sfx"+"32.cfg"+"JavaInst.7z" "SFX_Java_%JAVAVER%-x86.exe"

Line 86 for the x64 installer:

copy /b /y ".\bin\JavaInst.sfx"+"64.cfg"+"JavaInst-x64.7z" "SFX_Java_%JAVAVER64%-x64.exe"

And line 102 for DUAL installer:

copy /b /y ".\bin\JavaInst.sfx"+"AIO.cfg"+"JavaInst-AIO.7z" "SFX_Java_%JAVAVER64%-Dual.exe"

(Lignes 74, 88, et 104 pour le script français)

 

Et voilà !

Link to comment
Share on other sites

I have another problem with the 2.6er installers (admin-install):

on Win7 x64 only the 32-bit plugin and 32bit-java console is active (system and IE11).

Using the 2.5er installer, i have a big setup-file, but here are 32 and 64 Bit versions correctly installed.
The java-mgmt is correctly on 64bit instead 32bit. IE11 has the 32 and 64Bit Plugin active.

Reversing the install order doesn´t change anything. So I´am back to 2.5er install and i accept the 100MB
installer size for a working dual version :(
 

Edited by Himan
Link to comment
Share on other sites

Thanks Himan, you helped me spotting a major bug: X64 Java was not installed with dual admin installers !

This bug was tricky because x64 was apparently installed.

If you installed dual admin installer made with v2.6, you should either recreate dual normal installer (with 2.5, 2.6 or 2.7), or dual admin installer made with v2.7.

 

Version 2.7 is out:

- Fixed a major bug found in v2.6: x64 Java wasn't installed with dual admin installer

- tweaked the compression: now a more relaxed compression is used with normal (no admin) installers: this will speed up creation without increasing the file size of the SFX if you don't want admin install. BCJ compression is now only used with admin install, where it make sense.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...