+ Post New Thread
Page 1 of 3 123 LastLast
Results 1 to 15 of 33
Windows Thread, Java MSI Deployment Fun.... in Technical; Ohh Java, how I loathe thee.... With every Java update comes sleepless nights and therapy sessions. Alright, Java 7u3 is ...
  1. #1
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    798
    Thank Post
    82
    Thanked 131 Times in 114 Posts
    Blog Entries
    8
    Rep Power
    31

    Java MSI Deployment Fun....

    Ohh Java, how I loathe thee.... With every Java update comes sleepless nights and therapy sessions. Alright, Java 7u3 is out now and I need to push it down to staff machines to plug the giant gaping security holes it leaves. I've followed Oracle's little how-to that can be found here and have had success. The problem is, Java will uninstall any previous version that is in the same major revision number. So if I deploy Java 6u31 and a machine already has 6u17 it'll remove it, but if I push 7u3 and there is a previous install of 6u30 it'll leave it. This is what I've observed, and it makes sense to remove older versions, but most of the time when it's pushed through Active Directory the uninstall goes up in smoke and leaves a broken install on the machine. This has happened countless times to me deploying both versions 6 and 7. Oddly enough, the push of 7u2 went without a hitch because almost everyone was running 6u30 on their machines, so Java didn't make an attempt to uninstall the previous version this time around. Now I'm back to deploying 7u3 and I'm worried it's going to break again. Has anyone else successfully pushed an MSI of Java through AD and lived to tell about it? I'm looking to get your observations on how successes and failures have played out. Thanks guys!

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    The only time i have got it to work properly is using a VBS script to remove all old versions and do a nice clean install. Works every time.

    As a side note you shouldnt really be used version 7 in production yet.

  3. #3
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    798
    Thank Post
    82
    Thanked 131 Times in 114 Posts
    Blog Entries
    8
    Rep Power
    31
    Quote Originally Posted by FN-GM View Post
    The only time i have got it to work properly is using a VBS script to remove all old versions and do a nice clean install. Works every time.

    As a side note you shouldnt really be used version 7 in production yet.
    Can you point me in the direction of said script?

    Your absolutely right, I jumped the gun on Java 7. I waited until 7u2 was out but I should have waited longer. Oracle doesn't even have it up on Java.com yet, but I never went there for updated versions as they all come with whatever flavor of month toolbar they have. The downloads on Java SE Downloads don't have that junk. I guess I never saw the notice because of this.

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    I use this batch file to check to see if Java is installed. If not strip out all other versions and install the current version. It used a VBS script to remove them.

    Code:
    if exist "C:\Software-Deployment-Logs\Java-6-Update30-x86.log" goto :EOF
    cscript /B /nologo "\\server\share\Remove-Java.vbs" /keeponly
    "\\server\share\jre1.6.0_30.msi" /quiet /log C:\Software-Deployment-Logs\Java-6-Update30-x86.log
    :EOF
    If you PM me your e-mail i will send the VBS script. I cant upload attachments for some reason and the character limit has been exceed

  5. 2 Thanks to FN-GM:

    Duke5A (14th March 2012), mcolbourn (25th September 2012)

  6. #5
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    798
    Thank Post
    82
    Thanked 131 Times in 114 Posts
    Blog Entries
    8
    Rep Power
    31
    You sir, have a PM. Thanks again.

  7. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    Please find the attached script
    Attached Files Attached Files

  8. 2 Thanks to FN-GM:

    cheesypete (27th March 2012), Davit2005 (14th March 2012)

  9. #7

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    764
    Thank Post
    175
    Thanked 57 Times in 55 Posts
    Rep Power
    35
    Quote Originally Posted by FN-GM View Post
    I use this batch file to check to see if Java is installed. If not strip out all other versions and install the current version. It used a VBS script to remove them.

    Code:
    if exist "C:\Software-Deployment-Logs\Java-6-Update30-x86.log" goto :EOF
    cscript /B /nologo "\\server\share\Remove-Java.vbs" /keeponly
    "\\server\share\jre1.6.0_30.msi" /quiet /log C:\Software-Deployment-Logs\Java-6-Update30-x86.log
    :EOF
    If you PM me your e-mail i will send the VBS script. I cant upload attachments for some reason and the character limit has been exceed
    Permission to PM you for vbs code also :-D ?

  10. #8

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    Quote Originally Posted by Davit2005 View Post
    Permission to PM you for vbs code also :-D ?
    ^^^ look up at post 6 ^^^

  11. Thanks to FN-GM from:

    Davit2005 (14th March 2012)

  12. #9

    Join Date
    May 2011
    Location
    Jus North of London, close but not too close
    Posts
    764
    Thank Post
    175
    Thanked 57 Times in 55 Posts
    Rep Power
    35
    Quote Originally Posted by FN-GM View Post
    ^^^ look up at post 6 ^^^
    Been a long week :-?

  13. #10
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    798
    Thank Post
    82
    Thanked 131 Times in 114 Posts
    Blog Entries
    8
    Rep Power
    31
    Awesome! I made the appropriate changes to the batch file and it uninstalled the previous Java version and dropped in the new one. Only thing to watch for is if you're running it for the first time msiexec won't create the Software-Deployment-Logs directory. If the folder that you want the log to show up in is not there, msiexec will simply quit without so much as even an explanation why in the event log.

    @FN-GM You rock. I can only imagine how much time it took to write and debug that script. Thanks again...

  14. #11

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    @Duke5A your welcome, but i cant take the credit for that script. It came from someone at Microsoft. Software-Deployment-Logs is a custom directory on our LAN. Do you need some code for a batch file to create it.

  15. #12
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    798
    Thank Post
    82
    Thanked 131 Times in 114 Posts
    Blog Entries
    8
    Rep Power
    31
    Quote Originally Posted by FN-GM View Post
    @Duke5A Do you need some code for a batch file to create it.
    I'm good in that regard. Just noting some goofy behavior from msiexec. One last question though, when you push this out do you just set the batch file as a start up script in GPO?

  16. #13

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,942
    Thank Post
    886
    Thanked 1,694 Times in 1,472 Posts
    Blog Entries
    12
    Rep Power
    447
    when you push this out do you just set the batch file as a start up script in GPO?
    We do yes.

  17. Thanks to FN-GM from:

    Duke5A (16th March 2012)

  18. #14

    Join Date
    Mar 2012
    Location
    US
    Posts
    56
    Thank Post
    5
    Thanked 3 Times in 3 Posts
    Rep Power
    5
    Quote Originally Posted by FN-GM View Post
    Please find the attached script
    Awesome idea! My jre gpo is giving me a hard time right now, but glad I ran across this.

  19. #15
    Duke5A's Avatar
    Join Date
    Jul 2010
    Posts
    798
    Thank Post
    82
    Thanked 131 Times in 114 Posts
    Blog Entries
    8
    Rep Power
    31
    Quote Originally Posted by rslulz View Post
    Awesome idea! My jre gpo is giving me a hard time right now, but glad I ran across this.
    It works great. It still blows my mind that this problem that has been hanging around since at least Java 6u17 hasn't been fixed yet. I guess I shouldn't expect much seeing as how Java still stores a ton of it's settings in a flat file in the user's profile directory. It would be nice if they pushed all of its settings back into the registry, fixed the installer, and gave us ADM templates to manage it. But I digress...

    Another issue I've seen is the installer doesn't register the file association correctly for .JNLP files. I've had users complaining of Java not properly launching when trying to pull up Java apps through a we browser. Well, this is why.

    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\.jnlp]
    @="JNLPFile"
    "Content Type"="application/x-java-jnlp-file"
    
    [HKEY_CLASSES_ROOT\JNLPFile]
    @="JNLP File"
    "EditFlags"=hex:00,00,01,00
    
    [HKEY_CLASSES_ROOT\JNLPFile\Shell]
    
    [HKEY_CLASSES_ROOT\JNLPFile\Shell\Open]
    @="&Launch"
    
    [HKEY_CLASSES_ROOT\JNLPFile\Shell\Open\Command]
    @="\"C:\\Windows\\system32\\javaws.exe\" \"%1\""
    Rolling this reg export up into the end of the batch script that FN-GM provided will fix this issue. This export was for 32-bit Java. I don't know if there is a difference for the 64.
    Last edited by Duke5A; 10th April 2012 at 04:47 PM.

  20. Thanks to Duke5A from:


SHARE:
+ Post New Thread
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 20th October 2010, 11:36 AM
  2. Java MSI Deployment - Takes ages to install
    By FN-GM in forum Educational Software
    Replies: 3
    Last Post: 11th October 2010, 11:21 AM
  3. msi deployments
    By browolf in forum Windows
    Replies: 1
    Last Post: 21st March 2008, 09:21 AM
  4. Dodgy Serif MSI Deployment
    By FN-GM in forum Windows
    Replies: 2
    Last Post: 6th February 2008, 02:30 PM
  5. server 2003 msi deployment
    By choran in forum Windows
    Replies: 2
    Last Post: 24th January 2008, 03:45 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •