Java uninstall issues...
Ok...
So as I further venture into the wonderfull world of deploying apps via AD (and I love it), I hit a sticky spot. I am trying to workup a Java 6r3 install msi (and that works fine) but i am trying to figure out a way to automaticly find any old versions of java and uninstall them before the msi rins... Any ideas.... I know that I can uninstall each one while sitting at a computer but that is really inconvient (understatement of the century) but there has to be a way to automate it. I did some web searching but came up empty, everyone says uninstall the old versions but no one seems to indicate a way to do this across a doamin from AD. I leave this question to the messageboard gods....
Richard
So as I further venture into the wonderfull world of deploying apps via AD (and I love it), I hit a sticky spot. I am trying to workup a Java 6r3 install msi (and that works fine) but i am trying to figure out a way to automaticly find any old versions of java and uninstall them before the msi rins... Any ideas.... I know that I can uninstall each one while sitting at a computer but that is really inconvient (understatement of the century) but there has to be a way to automate it. I did some web searching but came up empty, everyone says uninstall the old versions but no one seems to indicate a way to do this across a doamin from AD. I leave this question to the messageboard gods....
Richard
0 Comments
[ + ] Show comments
Answers (28)
Please log in to answer
Posted by:
brianb0177
17 years ago
take a look in the registry for the GUID of the previous java versions then how ever many version you have add in a script to remove them ie
msiexec /x {GUID-1} /q
msiexec /x {GUID-2} /q
and so forth, if it does not exist it will continue going with no error displayed or you could write a script with some logic included to check for the guids and then uninstall as needed
msiexec /x {GUID-1} /q
msiexec /x {GUID-2} /q
and so forth, if it does not exist it will continue going with no error displayed or you could write a script with some logic included to check for the guids and then uninstall as needed
Posted by:
linstead
17 years ago
you can also write a script to check for the installstate and them uninstall using what brianb0177 said.
Dim installer
Dim product
Dim products
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
'Enumerate through all registered products, checking the installstate
Set products = installer.Products
For Each product In products
Wscript.echo product
Next
Dim installer
Dim product
Dim products
Set installer = Wscript.CreateObject("WindowsInstaller.Installer")
'Enumerate through all registered products, checking the installstate
Set products = installer.Products
For Each product In products
Wscript.echo product
Next
Posted by:
Dmention
17 years ago
ok... so i get it, use a script to check to see what is installed by using the GUID which is listed http://java.sun.com/javase/6/docs/technotes/guides/deployment/deployment-guide/silent.html#uninstalling .
this may be a newb question but how do I get the msi to call that script before starting the rest of the install... (pointing me to a link with the info is ok)
Richard
this may be a newb question but how do I get the msi to call that script before starting the rest of the install... (pointing me to a link with the info is ok)
Richard
Posted by:
linstead
17 years ago
Posted by:
nheim
17 years ago
Hi Richard,
the easiest an most reliable approach would be to populate the the 'Upgrade' table with the codes from the previous versions.
Because Sun changes this code with each version you would have to put in quite a lot of them, but this is faster than to make sure,
that each single version gets detected by a script.
However, there is caveat: You can, of course, detect only MSI versions of Java. They started using MSI with v 1.4.2 (released 06/2003).
See: http://itninja.com/question/tivoli-and-ms-mdac-2.8029
The codes are ascending as follows:
{7148F0A7-6813-11D6-A77B-00B0D0142000}
.
.
{7148F0A7-6813-11D6-A77B-00B0D0142120}
from 1.5.0 on:
{3248F0A7-6813-11D6-A77B-00B0D0150000}
.
.
{3248F0A7-6813-11D6-A77B-00B0D0160020}
You need to define a property for each line in the Upgrade table and put it also in 'SecureCustomProperties'.
Regards, Nick
the easiest an most reliable approach would be to populate the the 'Upgrade' table with the codes from the previous versions.
Because Sun changes this code with each version you would have to put in quite a lot of them, but this is faster than to make sure,
that each single version gets detected by a script.
However, there is caveat: You can, of course, detect only MSI versions of Java. They started using MSI with v 1.4.2 (released 06/2003).
See: http://itninja.com/question/tivoli-and-ms-mdac-2.8029
The codes are ascending as follows:
{7148F0A7-6813-11D6-A77B-00B0D0142000}
.
.
{7148F0A7-6813-11D6-A77B-00B0D0142120}
from 1.5.0 on:
{3248F0A7-6813-11D6-A77B-00B0D0150000}
.
.
{3248F0A7-6813-11D6-A77B-00B0D0160020}
You need to define a property for each line in the Upgrade table and put it also in 'SecureCustomProperties'.
Regards, Nick
Posted by:
ccook13
17 years ago
UpgradeCode: {3248F0A8-6813-11D6-A77B-00B0D0150110}
VersionMin: <blank>
VersionMax: ??
Language: <blank>
Attributes: 4??
Remove: <blank>
ActionProperty: OLDVERSION15011
---
Modify "
SecureCustomProperties: INSTALLINTL;OLDVERSION15011
As you can see I am not sure what to do about the version fields and the attribute field. Is the name I made up for
Any help is appreciated!
Cliff
Posted by:
nheim
17 years ago
Hi Cliff,
log the beast and search for 'findrelatedproducts' in the log. This should tell you what's going on.
Please fill in something usefull for the Min/Max fields. Eg. Min: 1.0.0 - Max: 10.0.0
And attribute '4' doesn't' make sense here, because the old app will not be removed, if something goes wrong. Use '256' instead.
Regards, Nick
log the beast and search for 'findrelatedproducts' in the log. This should tell you what's going on.
Please fill in something usefull for the Min/Max fields. Eg. Min: 1.0.0 - Max: 10.0.0
And attribute '4' doesn't' make sense here, because the old app will not be removed, if something goes wrong. Use '256' instead.
Regards, Nick
Posted by:
ogeccut
17 years ago
Posted by:
ccook13
17 years ago
I did as you suggested, VersionMin = 1.0.0, VersionMax = 10.0.0, Attribute = 256, other values as in my previous post. Here are relevant excerpts from the log. First this:
Any help is appreciated!
Cliff
Posted by:
aogilmor
17 years ago
Richard,
I would actually advise against doing this, as every Java version since 1.4.2 or so has been pretty good about keeping their "stuff" in their own installation directories. Indeed, it is not uncommon to have 4 or 5 versions of Java runtime with no ill effects.
Is there a specific reason you absolutely need to remove older versions?
OG
I would actually advise against doing this, as every Java version since 1.4.2 or so has been pretty good about keeping their "stuff" in their own installation directories. Indeed, it is not uncommon to have 4 or 5 versions of Java runtime with no ill effects.
Is there a specific reason you absolutely need to remove older versions?
OG
Posted by:
ccook13
17 years ago
Posted by:
schieb
17 years ago
Just short of msiexec /X GUID which is how I do it, you can use this vbs:
http://www.altirigos.com/vbulletin/scripts/629-magic-uninstall-vbs.html
magicuninstall.vbs /Program:"J2SE Runtime" /Options:"REBOOT=ReallySuppress /qn"
http://www.altirigos.com/vbulletin/scripts/629-magic-uninstall-vbs.html
magicuninstall.vbs /Program:"J2SE Runtime" /Options:"REBOOT=ReallySuppress /qn"
Posted by:
ccook13
17 years ago
Posted by:
nheim
17 years ago
Posted by:
aogilmor
17 years ago
ORIGINAL: ccook13
Prior versions of Java suffer from a variety of security holes. We do not need to have multiple versions running at our office, so I see no need to retain software that could present a security problem at some point in the future.
Since every Java runtime has SOME security flaw, the current version "could present a security problem at some point in the future." So what are you gonna do, wait forever? Wait till the Pope blesses it? Not deploy it at all?
Security is somewhat of a red herring, since you have to actually access the machine through the OS, or actively open Java, to make yourself vulnerable. Not to mention that UN-installing previous versions will activate Java auto-updates even if you deployed java without it (use the search to find articles on this documented bug). I'd rather deal with the very small security threat with OS hardening, antivirus tools, etc. than forcing an uninstall and dealing with the sloppy java settings.
If you are determined to force an uninstall, you better make damn sure no java apps in your environment are tied to previous versions....you don't want to get a call telling you your package broke so-and-so's web application. (to avoid this problem many java apps will even include the runtime files in their own directory structure)
Posted by:
ccook13
17 years ago
Here are the changes I made to the MSI:
- Changes to the Property Table include the following:
IEXPLORER - 1 (installs as plugin to IE)
JAVAUPDATE - 0 (stops autoupdate)
JU - 0 (stops autoupdate)
AUTOUPDATECHECK - 0 (stops autoupdate)
MOZILLA - 1 (installs as plugin to Firefox)
RebootYesNo - No (prevents reboot as part of install)
SecureCustomProperties - INSTALLINTL;OLDVERSION16001 (second key word refers to added line in Upgrade table)
SYSTRAY - 0 (removes icon from systray)
- Added following line to MSI Upgrade Table:
Upgrade Table add:
{3248F0A7-6813-11D6-A77B-00B0D0160010} (Uninstall GUID for 1.6.01)
1.0.0
10.0.0
-
256
-
OLDVERSION16001
- Removed following line InstallExecuteSequence Table:
CreateShortcuts
Thanks to all who posted, esp. Nick.
Cliff
Posted by:
Dmention
17 years ago
Sorry to drag this back up... but... I populated the upgrade table with 1.4.2 to 1.6.2 but findrelatedproducts returned 0 in the log... I believe that means it did not detect and therefore did not uninstall the previous versions. I ran an install of one of the 1.4.2.11 and 1.5.10 and 1.6.2 to test... it seems to have upgraded 1.6.2 but not any of the others...
some snipits of log...
Action start 15:33:08: FindRelatedProducts.
MSI (s) (6C:20) [15:33:08:626]: Skipping action: CCPSearch (condition is false)
MSI (s) (6C:20) [15:33:08:626]: Skipping action: RMCCPSearch (condition is false)
MSI (s) (6C:20) [15:33:08:626]: Doing action: ValidateProductID
Action ended 15:33:08: FindRelatedProducts. Return value 0.
www.darkwwstarmediallc.com/jre163_custom.txt for log... www.darkwwstarmediallc.com/JRE_v6r3.zip for the msi (change .zip to .msi)
some snipits of log...
Action start 15:33:08: FindRelatedProducts.
MSI (s) (6C:20) [15:33:08:626]: Skipping action: CCPSearch (condition is false)
MSI (s) (6C:20) [15:33:08:626]: Skipping action: RMCCPSearch (condition is false)
MSI (s) (6C:20) [15:33:08:626]: Doing action: ValidateProductID
Action ended 15:33:08: FindRelatedProducts. Return value 0.
www.darkwwstarmediallc.com/jre163_custom.txt for log... www.darkwwstarmediallc.com/JRE_v6r3.zip for the msi (change .zip to .msi)
Posted by:
nheim
17 years ago
Posted by:
Dmention
17 years ago
Posted by:
mrcoward
16 years ago
Howdy lads and ladies. This script will remove any msi versions of Sun java JRE.
I look after 6000 desktops and have had good success with it.
It will export the uninstall information from the registry then scan throught it for and versions with the display name and publisher stipulated below (sun and java). It will then remove and of the versions it finds. Should be good for 1.4.0.00 onwards.
Note: copy text below and save as Yourfile.vbs from notepad
'<start>
' Author Paul M
' http://bf2s.com/player/67452048/
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
On Error Resume Next
tempdir = WshShell.ExpandEnvironmentStrings("%temp%")
'Delete old files if they exist
fso.DeleteFile(tempdir & "\sunjava.tmp"),true
fso.DeleteFile(tempdir & "\uninstallsunjava.txt"),true
'Export registry information
WshShell.run "cmd.exe /c REGEDIT /E " & tempdir _
& "\sunjava.txt HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall",0,true
'Filter only the {} keys that Java might be in
WshShell.run "cmd.exe /c type " & tempdir & "\sunjava.txt | find /i " & chr(34) & "{" & chr(34) & " | find /i " _
& chr(34) & "}]" & chr(34) & "> " & tempdir & "\uninstallsunjava.txt",0,true
'Open the exported registry file
Set MyFile = fso.OpenTextFile(tempdir & "\uninstallsunjava.txt", ForReading)
Do Until MyFile.AtEndOfStream
ReadLineTextFile = MyFile.ReadLine
Uninstall = ReadLineTextFile
CLSID = Mid(Uninstall, 73, 38)
'DisplayName
DisplayName=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID _
& "\DisplayName")
'Publisher
Publisher=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID _
& "\Publisher")
'Search for presence of Java and Sun in DisplayName and Publisher
search1 = Instr(1, DisplayName, "Java", 1)
search2 = Instr(1, Publisher, "Sun", 1)
'Execute removal if there is a match
Uninstaller="MsiExec.exe /X" & CLSID & " /passive /norestart"
if search1>0 And search2>0 Then Return = WshShell.Run(Uninstaller , 1, TRUE)
Loop
MyFile.close
'Install new version
'<end>
I look after 6000 desktops and have had good success with it.
It will export the uninstall information from the registry then scan throught it for and versions with the display name and publisher stipulated below (sun and java). It will then remove and of the versions it finds. Should be good for 1.4.0.00 onwards.
Note: copy text below and save as Yourfile.vbs from notepad
'<start>
' Author Paul M
' http://bf2s.com/player/67452048/
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
On Error Resume Next
tempdir = WshShell.ExpandEnvironmentStrings("%temp%")
'Delete old files if they exist
fso.DeleteFile(tempdir & "\sunjava.tmp"),true
fso.DeleteFile(tempdir & "\uninstallsunjava.txt"),true
'Export registry information
WshShell.run "cmd.exe /c REGEDIT /E " & tempdir _
& "\sunjava.txt HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall",0,true
'Filter only the {} keys that Java might be in
WshShell.run "cmd.exe /c type " & tempdir & "\sunjava.txt | find /i " & chr(34) & "{" & chr(34) & " | find /i " _
& chr(34) & "}]" & chr(34) & "> " & tempdir & "\uninstallsunjava.txt",0,true
'Open the exported registry file
Set MyFile = fso.OpenTextFile(tempdir & "\uninstallsunjava.txt", ForReading)
Do Until MyFile.AtEndOfStream
ReadLineTextFile = MyFile.ReadLine
Uninstall = ReadLineTextFile
CLSID = Mid(Uninstall, 73, 38)
'DisplayName
DisplayName=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID _
& "\DisplayName")
'Publisher
Publisher=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID _
& "\Publisher")
'Search for presence of Java and Sun in DisplayName and Publisher
search1 = Instr(1, DisplayName, "Java", 1)
search2 = Instr(1, Publisher, "Sun", 1)
'Execute removal if there is a match
Uninstaller="MsiExec.exe /X" & CLSID & " /passive /norestart"
if search1>0 And search2>0 Then Return = WshShell.Run(Uninstaller , 1, TRUE)
Loop
MyFile.close
'Install new version
'<end>
Posted by:
mrcoward
16 years ago
Added in the quotes to deal with spaces in the file path for XP's temp path. :)
'<start>
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
On Error Resume Next
Wscript.sleep 1000
tempdir = WshShell.ExpandEnvironmentStrings("%temp%")
'Delete old files if they exist
fso.DeleteFile(chr(34) & tempdir & "\sunjava.tmp" & chr(34)),true
fso.DeleteFile(chr(34) & tempdir & "\uninstallsunjava.txt"& chr(34)),true
'Export registry information
WshShell.run "cmd.exe /c REGEDIT /E " & tempdir & "\sunjava.txt HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall",0,true
'Filter only the {} keys that Java might be in
WshShell.run "cmd.exe /c type " & chr(34) & tempdir & "\sunjava.txt" & chr(34) & " | find /i " & chr(34) & "{" & chr(34) & " | find /i " _
& chr(34) & "}]" & chr(34) & "> " & chr(34) & tempdir & "\uninstallsunjava.txt" & chr(34),0,true
'Open the exported registry file
Set MyFile = fso.OpenTextFile(tempdir & "\uninstallsunjava.txt", ForReading)
Do Until MyFile.AtEndOfStream
ReadLineTextFile = MyFile.ReadLine
Uninstall = ReadLineTextFile
CLSID = Mid(Uninstall, 73, 38)
'DisplayName
DisplayName=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID & "\DisplayName")
'Publisher
Publisher=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID & "\Publisher")
'Search for presence of Java and Sun in DisplayName and Publisher
search1 = Instr(1, DisplayName, "Java", 1)
search2 = Instr(1, Publisher, "Sun", 1)
'Execute removal if there is a match
Uninstaller="MsiExec.exe /X" & CLSID & " /passive /norestart"
if search1>0 And search2>0 Then Return = WshShell.Run(Uninstaller , 1, TRUE)
Loop
MyFile.close
'Install new version
wscript.sleep (3000)
'<end>
'<start>
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
On Error Resume Next
Wscript.sleep 1000
tempdir = WshShell.ExpandEnvironmentStrings("%temp%")
'Delete old files if they exist
fso.DeleteFile(chr(34) & tempdir & "\sunjava.tmp" & chr(34)),true
fso.DeleteFile(chr(34) & tempdir & "\uninstallsunjava.txt"& chr(34)),true
'Export registry information
WshShell.run "cmd.exe /c REGEDIT /E " & tempdir & "\sunjava.txt HKEY_LOCAL_MACHINE\SOFTWARE\microsoft\windows\currentversion\uninstall",0,true
'Filter only the {} keys that Java might be in
WshShell.run "cmd.exe /c type " & chr(34) & tempdir & "\sunjava.txt" & chr(34) & " | find /i " & chr(34) & "{" & chr(34) & " | find /i " _
& chr(34) & "}]" & chr(34) & "> " & chr(34) & tempdir & "\uninstallsunjava.txt" & chr(34),0,true
'Open the exported registry file
Set MyFile = fso.OpenTextFile(tempdir & "\uninstallsunjava.txt", ForReading)
Do Until MyFile.AtEndOfStream
ReadLineTextFile = MyFile.ReadLine
Uninstall = ReadLineTextFile
CLSID = Mid(Uninstall, 73, 38)
'DisplayName
DisplayName=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID & "\DisplayName")
'Publisher
Publisher=WshShell.RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" & CLSID & "\Publisher")
'Search for presence of Java and Sun in DisplayName and Publisher
search1 = Instr(1, DisplayName, "Java", 1)
search2 = Instr(1, Publisher, "Sun", 1)
'Execute removal if there is a match
Uninstaller="MsiExec.exe /X" & CLSID & " /passive /norestart"
if search1>0 And search2>0 Then Return = WshShell.Run(Uninstaller , 1, TRUE)
Loop
MyFile.close
'Install new version
wscript.sleep (3000)
'<end>
Posted by:
schieb
16 years ago
Nick,
I was wondering if you could clarify your use of the Attribute field in the Upgrade Table. Here when you are mentioning Java 1.4 you use the attribute 4, http://itninja.com/question/uninstall?-major-upgrade? post 20. However in this thread above you said to use 256. Or should I use 260? Here is the upgrade code list I have come up with so far:
Thank you.
I was wondering if you could clarify your use of the Attribute field in the Upgrade Table. Here when you are mentioning Java 1.4 you use the attribute 4, http://itninja.com/question/uninstall?-major-upgrade? post 20. However in this thread above you said to use 256. Or should I use 260? Here is the upgrade code list I have come up with so far:
Property Table
IEXPLORER 1
JAVAUPDATE 0
AUTOUPDATECHECK 0
JU 0
SYSTRAY 0
SecureCustomProperties INSTALLINTL;JRE400;JRE401;JRE402;JRE403;JRE404;JRE405;JRE406;JRE407;JRE408;JRE409;JRE410;JRE411;JRE412;JRE413;JRE414;JRE415;JRE416;JRE500;JRE501;JRE502;JRE503;JRE504;JRE505;JRE506;JRE507;JRE508;JRE509;JRE510;JRE511;JRE512;JRE513;JRE514;JRE515;JRE600;JRE601;JRE602;JRE603;JRE604;JRE605;JRE606
Upgrade Table
Upgrade UpgradeCode VersionMin VersionMax Language Attributes
{3248F0A8-6813-11D6-A77B-00B0D0150000} 1.0.0 150.0.0 256 JRE500
{3248F0A8-6813-11D6-A77B-00B0D0150010} 1.0.0 150.0.0 256 JRE501
{3248F0A8-6813-11D6-A77B-00B0D0150020} 1.0.0 150.0.0 256 JRE502
{3248F0A8-6813-11D6-A77B-00B0D0150030} 1.0.0 150.0.0 256 JRE503
{3248F0A8-6813-11D6-A77B-00B0D0150040} 1.0.0 150.0.0 256 JRE504
{3248F0A8-6813-11D6-A77B-00B0D0150050} 1.0.0 150.0.0 256 JRE505
{3248F0A8-6813-11D6-A77B-00B0D0150060} 1.0.0 150.0.0 256 JRE506
{3248F0A8-6813-11D6-A77B-00B0D0150070} 1.0.0 150.0.0 256 JRE507
{3248F0A8-6813-11D6-A77B-00B0D0150080} 1.0.0 150.0.0 256 JRE508
{3248F0A8-6813-11D6-A77B-00B0D0150090} 1.0.0 10.0.0 256 JRE509
{3248F0A8-6813-11D6-A77B-00B0D0150100} 1.0.0 10.0.0 256 JRE510
{3248F0A8-6813-11D6-A77B-00B0D0150110} 1.0.0 10.0.0 256 JRE511
{3248F0A8-6813-11D6-A77B-00B0D0150120} 1.0.0 10.0.0 256 JRE512
{3248F0A8-6813-11D6-A77B-00B0D0150130} 1.0.0 10.0.0 256 JRE513
{3248F0A8-6813-11D6-A77B-00B0D0150140} 1.0.0 10.0.0 256 JRE514
{3248F0A8-6813-11D6-A77B-00B0D0150150} 1.0.0 10.0.0 256 JRE515
{3248F0A8-6813-11D6-A77B-00B0D0160000} 1.0.0 10.0.0 256 JRE600
{3248F0A8-6813-11D6-A77B-00B0D0160010} 1.0.0 10.0.0 256 JRE601
{3248F0A8-6813-11D6-A77B-00B0D0160020} 1.0.0 10.0.0 256 JRE602
{3248F0A8-6813-11D6-A77B-00B0D0160030} 1.0.0 10.0.0 256 JRE603
{3248F0A8-6813-11D6-A77B-00B0D0160040} 1.0.0 10.0.0 256 JRE604
{3248F0A8-6813-11D6-A77B-00B0D0160050} 1.0.0 10.0.0 256 JRE605
{3248F0A8-6813-11D6-A77B-00B0D0160060} 1.0.0 10.0.0 256 JRE606
{7148F0A8-6813-11D6-A77B-00B0D0142000} 1.0.0 130.0.0 256 JRE400
{7148F0A8-6813-11D6-A77B-00B0D0142010} 1.0.0 130.0.0 256 JRE401
{7148F0A8-6813-11D6-A77B-00B0D0142020} 1.0.0 130.0.0 256 JRE402
{7148F0A8-6813-11D6-A77B-00B0D0142030} 1.0.0 130.0.0 256 JRE403
{7148F0A8-6813-11D6-A77B-00B0D0142040} 1.0.0 130.0.0 256 JRE404
{7148F0A8-6813-11D6-A77B-00B0D0142050} 1.0.0 130.0.0 256 JRE405
{7148F0A8-6813-11D6-A77B-00B0D0142060} 1.0.0 130.0.0 256 JRE406
{7148F0A8-6813-11D6-A77B-00B0D0142070} 1.0.0 130.0.0 256 JRE407
{7148F0A8-6813-11D6-A77B-00B0D0142080} 1.0.0 130.0.0 256 JRE408
{7148F0A8-6813-11D6-A77B-00B0D0142090} 1.0.0 130.0.0 256 JRE409
{7148F0A8-6813-11D6-A77B-00B0D0142100} 1.0.0 130.0.0 256 JRE410
{7148F0A8-6813-11D6-A77B-00B0D0142110} 1.0.0 130.0.0 256 JRE411
{7148F0A8-6813-11D6-A77B-00B0D0142120} 1.0.0 130.0.0 256 JRE412
{7148F0A8-6813-11D6-A77B-00B0D0142130} 1.0.0 130.0.0 256 JRE413
{7148F0A8-6813-11D6-A77B-00B0D0142140} 1.0.0 130.0.0 256 JRE414
{7148F0A8-6813-11D6-A77B-00B0D0142150} 1.0.0 130.0.0 256 JRE415
{7148F0A8-6813-11D6-A77B-00B0D0142160} 1.0.0 130.0.0 256 JRE416
Thank you.
Posted by:
nheim
16 years ago
Hi schieb,
See: http://msdn.microsoft.com/en-us/library/aa372379(VS.85).aspx
I think most often, 256 will do. In earlier days, i was always including the value of "4", but i don't do it anymore.
This gives more stability, IMHO. After all, it's better to let it trow an error, if something goes wrong, than have two crippled installs on a machine.
Regards, Nick
See: http://msdn.microsoft.com/en-us/library/aa372379(VS.85).aspx
I think most often, 256 will do. In earlier days, i was always including the value of "4", but i don't do it anymore.
This gives more stability, IMHO. After all, it's better to let it trow an error, if something goes wrong, than have two crippled installs on a machine.
Regards, Nick
Posted by:
schieb
16 years ago
I have updated my table above after your explanation. I am going to have to keep testing it though because I can't seem to get the uninstall to run. The logs show:
MSI (s) (9C:7C) [16:03:09:640]: Doing action: FindRelatedProducts
Action ended 16:03:09: LaunchConditions. Return value 1.
MSI (s) (9C:7C) [16:03:09:640]: Note: 1: 2262 2: Upgrade 3: -2147287038
MSI (s) (9C:7C) [16:03:09:640]: Transforming table Upgrade.
Action start 16:03:09: FindRelatedProducts.
I have tried it as an mst and an msi with no change.
MSI (s) (9C:7C) [16:03:09:640]: Doing action: FindRelatedProducts
Action ended 16:03:09: LaunchConditions. Return value 1.
MSI (s) (9C:7C) [16:03:09:640]: Note: 1: 2262 2: Upgrade 3: -2147287038
MSI (s) (9C:7C) [16:03:09:640]: Transforming table Upgrade.
Action start 16:03:09: FindRelatedProducts.
I have tried it as an mst and an msi with no change.
Posted by:
anonymous_9363
16 years ago
Posted by:
schieb
16 years ago
Posted by:
Noah
16 years ago
ORIGINAL: mrcoward
Added in the quotes to deal with spaces in the file path for XP's temp path. :)
'<start>
Set WshShell = WScript.CreateObject("WScript.Shell")
Dim fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Const ForReading = 1, ForWriting = 2
On Error Resume Next
Hi, I tested your script and it didn't seem to detect Java V5..
I modified the line under 'Search for presence of Java and Sun in DisplayName and Publisher to have an extra search parameter,
search3 = Instr(1, DisplayName, "J2SE Runtime Environment", 1)
and I changed under 'Execute removal if there is a match
to if search1>0 And search2>0 Or search3>0 And search1>0 Then Return = WshShell.Run(Uninstaller , 1, TRUE)
Is this correct? The script will run if it detects Sun and Java, OR Sun and J2ME Runtime Environment? Just wanted to be sure it won't now uninstall all sun products...
Thanks,
Noah
Posted by:
mazeb00
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.