Unintstall old Office before installing new

Antworten
Toolman
Beiträge: 77
Registriert: 14. Feb 2006, 20:35
Kontaktdaten:

Unintstall old Office before installing new

Beitrag von Toolman » 10. Mär 2013, 10:41

Hello,

We made 2 packages with the Package Wizard (MSI) for Office 2003 Stnd and Pro.
The installation goes well and the uninstall through the Empirum Management Console goes well.
But we want to check if there is an Office version on the computer and then uninstall that version before installing the other.
So when we install the Pro version it needs to check if there is a Standard and then remove it before installing the Pro.

We've taken the uninstall string of the Pro package and put in the Standard and the uninstall of the Standard and put it into the Pro. This works only half, the Empirum Registry key isn't removed so the inventory now says it has both versions.

We've tried many different syntaxes but we cannot get it working

Code: Alles auswählen

[Set:Product]
;Checken if MS Office Pro is installed and then remove it
Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90110413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90110413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" Then "RemovePRO" Else "InstallMSI" EndIf

[RemovePRO]
;If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90110413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90110413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" Then "AbortMSIUnInst" EndIf
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
-Call MsiExec /X {90110413-6000-11D3-8CFE-0150048383C9} REBOOT=REALLYSUPPRESS /passive /Li "%MSILogFile%"

Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90120413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90120413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" Then "RepairMSI" Else "InstallMSI" EndIf

[RepairMSI]
AddMeter -1
Call MsiExec /Fvomus "%SRC%\STD11.MSI"  TRANSFORMS="%SRC%\BRW_Custom.MST" REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qr /Li "%MSILogFile%"
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
If DoesTextInFileExist ("%ReInstSuccessMessage1031%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1031_1%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1033%", "%MSILogFile%") == "0" & DoesTextInFileExist ("%ReInstSuccessMessage1033_1%", "%MSILogFile%") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"

[InstallMSI]
AddMeter -1
;Call MsiExec /I "%SRC%\STD11.MSI"  TRANSFORMS="%SRC%\BRW_Custom.MST" REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /qr /Li "%MSILogFile%"
Call MsiExec /I "%SRC%\STD11.MSI"  TRANSFORMS="%SRC%\BRW_Custom.MST" REBOOT=REALLYSUPPRESS ARPSYSTEMCOMPONENT=1 /passive /Li "%MSILogFile%"
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90120413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "0" & DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90120413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "0" Then "AbortMSIInst" EndIf
Del "%MSILogFile%"

[Set:Uninstall]
-Del "%MSILogFile%"
If DoesRegKeyExist ("HKLM,SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{90120413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" | DoesRegKeyExist ("HKLM,SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{90120413-6000-11D3-8CFE-0150048383C9},UnInstallString") == "1" Then "AbortMSIUnInst" EndIf
If %ErrorLevel% == "3010" Then "RebootRequired" EndIf
;-Call MsiExec /X {90120413-6000-11D3-8CFE-0150048383C9} REBOOT=REALLYSUPPRESS /qr /Li "%MSILogFile%"
-Call MsiExec /X {90120413-6000-11D3-8CFE-0150048383C9} REBOOT=REALLYSUPPRESS /passive /Li "%MSILogFile%"
-AddMeter -1
Does anybody know what we are doeing wrong? We are stuck.

Sander

Toolman
Beiträge: 77
Registriert: 14. Feb 2006, 20:35
Kontaktdaten:

Re: Unintstall old Office before installing new

Beitrag von Toolman » 10. Mär 2013, 11:46

Tried calling the setup.exe with the /U but that didn't do the trick :(

Code: Alles auswählen

Call "C:\Program Files\Common Files\Setup32\Setup.exe" "C:\Program Files\Microsoft Office Standard Editie 2003\Install_BRW_Custom\Setup.inf" /S1 /U

Benutzeravatar
Hendrik_Ambrosius
Moderator
Moderator
Beiträge: 7410
Registriert: 13. Dez 2004, 23:10
Wohnort: Adendorf/Lüneburg

Re: Unintstall old Office before installing new

Beitrag von Hendrik_Ambrosius » 11. Mär 2013, 13:19

This is not really a clean approach but anyway - if you want to get rid of the old Empirum relicts delete the registry keys that come with the Empirum package installation below HKLM\Software.
Hendrik Ambrosius / Senior Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 AG | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 AG or of the support team.

Toolman
Beiträge: 77
Registriert: 14. Feb 2006, 20:35
Kontaktdaten:

Re: Unintstall old Office before installing new

Beitrag von Toolman » 11. Mär 2013, 13:29

Thanks for the answer. But what is the clean approach?
I thought that /U was a right approuch.

Regards,

Sander

Benutzeravatar
Hendrik_Ambrosius
Moderator
Moderator
Beiträge: 7410
Registriert: 13. Dez 2004, 23:10
Wohnort: Adendorf/Lüneburg

Re: Unintstall old Office before installing new

Beitrag von Hendrik_Ambrosius » 11. Mär 2013, 22:05

The clean approach is an uninstallation of the package by setting the distribution option to "uninstall" in the Empirum Console.
You could create assignment groups with both packages assigned (uninstall + install) and add the PCs (e.g. from a filter checking for office installations).
Hendrik Ambrosius / Senior Consultant
Mobile: +49 172 408 4447 | hendrik.ambrosius@matrix42.com
Matrix42 AG | Elbinger Straße 7 | 60487 Frankfurt am Main | Germany | www.matrix42.com

Disclaimer: I participate in this forum on a voluntary basis. Views expressed are not necessarily those of Matrix42 AG or of the support team.

Antworten

Zurück zu „Packaging“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast