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: Select all
[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
Sander