[RESOLVED]Help with switchless Java install please

Questions or comments on the switchless installers? Want to create a new one? Talk about it here.
Post Reply
Nick2009
Posts: 10
Joined: Sat May 02, 2009 1:54 pm

[RESOLVED]Help with switchless Java install please

Post by Nick2009 » Sat Feb 16, 2013 8:37 pm

First of all, I just want to say that I really appreciate everyone's efforts in making their Java installers available for others on this site.

I have been trying to put together my first installer but I have run into a problem with it.

I followed the advice in this thread:
http://www.ryanvm.net/forum/viewtopic.php?t=5202

Downloading the tools and Java installers was straightforward enough. I then started the installers and copied the relevant files from:
%USERPROFILE%\AppData\LocalLow\Sun\Java
To my working directory.

I then opened a command window and run the following command from the msi's extracted from the installers:

Code: Select all

msiexec.exe /a jre(version/build).msi targetdir=%homedrive%\Admin /qb
I moved the contents of the Admin folder to the Bin folder in my working directory.

I changed the icon on the 7zsd.sfx to a preferred one.

I used Kelsenellenelvian's Config.txt (although I changed the file names to match the .msi file names in my bin folder):

Code: Select all

;!@Install@!UTF-8!
GUIMode="2"
MiscFlags="4"
RunProgram="x64:jrex64.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 /norestart"
RunProgram="jrex86.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 /norestart"
RunProgram="x64:hidcon:\"%programfiles(x86)%\\Java\\jre7\\bin\\jqs.exe\" -unregister"
RunProgram="x86:hidcon:\"%programfiles%\\Java\\jre7\\bin\\jqs.exe\" -unregister"
;!@InstallEnd@! 
I then made a Create.cmd file with the following contents:

Code: Select all

upx --ultra-brute 7zsd.sfx
cd Bin
..\7za a "..\Program.7z" -r *.* -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on
cd ..
copy /b 7zsd.sfx + Config.txt + Program.7z Java.exe
del Program.7z 
I then run Create.cmd and everything appears to work. Java.exe file is created but when I run it, I get the following error message:

Code: Select all

Java: error
Could not read SFX configuration or configuration not found.
Could anyone suggest anything to resolve it please?

Thanks for any help.
Last edited by Nick2009 on Sat Feb 16, 2013 9:38 pm, edited 1 time in total.

Nick2009
Posts: 10
Joined: Sat May 02, 2009 1:54 pm

Post by Nick2009 » Sat Feb 16, 2013 8:55 pm

I'm an idiot...

I created a Config.txt.txt file!

It's late and I'm rather tired.

Ok, so I have got passed my initial error but now I'm getting another one:

Code: Select all

Error during execution "x64:jrex64.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 /norestart".

Nick2009
Posts: 10
Joined: Sat May 02, 2009 1:54 pm

Post by Nick2009 » Sat Feb 16, 2013 9:37 pm

I got it sorted. Just made a couple of changes to the config.txt file and everything works perfectly :)

Thanks to arco and Kelsenellenelvian...plus anyone else who has helped by sharing their knowledge on this site. I may not post very often but I have learnt a hell of a lot since registering.

User avatar
bphlpt
Posts: 1359
Joined: Sat Apr 19, 2008 1:11 am

Post by bphlpt » Sun Feb 17, 2013 12:59 am

@Nick2009,

For the benefit of others who want to try to duplicate your efforts to learn how to do this, it might be helpful to post your final successful Config.txt, if you didn't already, as well as giving a link or something to where you got Kel's original one you used as a model. Just to tie everything together all in one place. If you choose to just edit your first post with the necessary corrections, use strike-through or something to indicate your original mistakes or misconceptions. As it is, even though I know you have made recent edits to the post, since you still end the post asking for help it is not clear whether the rest of the post has been corrected or if it still has issues. Otherwise, this was a great example to others how to learn the very useful skill of making your own 7-Zip Switchless Installer. Thanks very much for posting!

Cheers and Regards

Nick2009
Posts: 10
Joined: Sat May 02, 2009 1:54 pm

Post by Nick2009 » Sun Feb 17, 2013 8:50 am

No probs..

Here's my final Config.txt. This one is for the x86 installer that I made:

Code: Select all

;!@Install@!UTF-8!
GUIMode="2"
MiscFlags="4"
RunProgram="jre1.7.0_13.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 /norestart"
RunProgram="hidcon:\"%programfiles(x86)%\\Java\\jre7\\bin\\jqs.exe\" -unregister"
;!@InstallEnd@! 
This one is for a dual installer:

Code: Select all

;!@Install@!UTF-8!
GUIMode="2"
MiscFlags="4"
RunProgram="jre1.7.0_13_64.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 /norestart"
RunProgram="jre1.7.0_13_86.msi /qn ADDLOCAL=ALL IEXPLORER=1 MOZILLA=1 SYSTRAY=0 JAVAUPDATE=0 JU=0 AUTOUPDATECHECK=0 /norestart"
RunProgram="hidcon:\"%programfiles%\\Java\\jre7\\bin\\jqs.exe\" -unregister"
RunProgram="hidcon:\"%programfiles(x86)%\\Java\\jre7\\bin\\jqs.exe\" -unregister"
;!@InstallEnd@! 
I used Kelsenellenelvian's switches and original Config.txt from:
http://www.ryanvm.net/forum/viewtopic.php?t=3850

I hope that is able to help someone in future :)

Post Reply