Uninstall previous versions at install

Can I have the installer of JRE 6.0 automatically uninstall any previous versions like 5.0.6 and higher on install?I am distributing the MSI with corresponding MST using GPO.
[188 byte] By [johnbota] at [2007-11-26 15:58:44]
# 1

> Can I have the installer of JRE 6.0 automatically

> uninstall any previous versions like 5.0.6 and higher

> on install?

> I am distributing the MSI with corresponding MST

> using GPO.

If all previous applications were installed via a GPO, you could add those GPOs to the update list and select to uninstall prior to installing JRE1.6.

However, I had to resort to a separate GPO containing a startup script (which will only run for about a month) containing the following string:

MsiExec.exe /x {UID} /qn

Once the previous versions are removed, it will fly by on subsequent restarts (it's a starup script, not logon).

where, UID = HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{UID}

Louis_XIVa at 2007-7-8 22:19:52 > top of Java-index,Desktop,Deploying...
# 2
Thanks for your reply. By now I did it manually but it was still interesting to read your suggestions.
johnbota at 2007-7-8 22:19:53 > top of Java-index,Desktop,Deploying...