开发者

Add-Remove Uninstall and msiexec /x not working accordingly for WiX-based installers

开发者 https://www.devze.com 2023-03-14 23:02 出处:网络
I’m facing this strange behavior for some of my WiX-based installers. After installation, if I try to remove via Add Remove Program (Programs and Features in Windows 7) using Right Click Menu an

I’m facing this strange behavior for some of my WiX-based installers. After installation, if I try to remove via Add Remove Program (Programs and Features in Windows 7) using Right Click Menu and select Uninstall (This default BTW), it only shows a progress dialog which quits immediately and program never uninstalls and stays intact.

The Same behavior is there upon using

msiexec /x {ProductCode}

(or Product.msi)

However, using Right Click Menu, select Change and then from Maintenance Dialog Box, select Remove, uninstalls it perfectly.

Here is the code for InstallUISequence and InstallExecuteSequence:

<InstallUISequence>
    <Custom Before="CostFinalize" Action="CheckPreReqs" />
    <Show Dialog="MaintenanceWelcomeDlg" 
          Overridable="yes" 
          Sequence="1230">Installed And Not RESUME And Not Preselected And Not PATCH</Show>
</InstallUISequence>
<InstallExecuteSequence>
    <ScheduleReboot Sequence="6410">ISSCHEDULEREBOOT</ScheduleReboot>
    <LaunchConditions Sequence="410">Not Installed</LaunchConditions>
    <FindRelatedProducts Sequence="420">NOT ISSETUPDRIVEN</FindRelatedProducts>
    <AppSearch Sequence="400" />
    <CCPSearch Sequence="500">CCP_TEST</CCPSearch>
    <RMCCPSearch Sequence="600">Not CCP_SUCCESS And CCP_TEST</RMCCPSearch>
    <ValidateProductID Sequence="700" />
    <CostInitialize Sequence="800" />
    <FileCost Sequence="900" />
    <IsolateComponents Sequence="950" />
    <CostFinalize Sequence="1000" />
    <SetODBCFolders Sequence="1100" />
    <MigrateFeatureStates Sequence="1200" />
    <InstallValidate Sequence="1400" />
    <InstallInitialize Sequence="1501" />
    <AllocateRegistrySpace Sequence="1550">NOT Installed</AllocateRegistrySpace>
    <ProcessComponents Sequence="1600" />
    <UnpublishComponents Sequence="1700" />
    <UnpublishFeatures Sequence="1800" />
    <StopServices Sequence="1900">VersionNT</StopServices>
    <DeleteServices Sequence="2000">VersionNT</DeleteServices>
    <UnregisterComPlus Sequence="2100" />
    <SelfUnregModules Sequence="2200" />
    <UnregisterTypeLibraries Sequence="2300" />
    <RemoveODBC Sequence="2400" />
    <UnregisterFonts Sequence="2500" />
    <RemoveRegistryValues Sequence="2600" />
    <UnregisterClassInfo Sequence="2700" />
    <UnregisterExtensionInfo Sequence="2800" />
    <UnregisterProgIdInfo Sequence="2900" />
    <UnregisterMIMEInfo Sequence="3000" />
    <RemoveIniValues Sequence="3100" />
    <RemoveShortcuts Sequence="3200" />
    <RemoveEnvironmentStrings Sequence="3300" />
    <RemoveDuplicateFiles Sequence="3400" />
    <RemoveFiles Sequence="3500" />
    <RemoveFolders Sequence="3600" />
    <CreateFolders S开发者_如何学运维equence="3700" />
    <MoveFiles Sequence="3800" />
    <InstallFiles Sequence="4000" />
    <DuplicateFiles Sequence="4210" />
    <PatchFiles Sequence="4090" />
    <BindImage Sequence="4300" />
    <CreateShortcuts Sequence="4500" />
    <RegisterClassInfo Sequence="4600" />
    <RegisterExtensionInfo Sequence="4700" />
    <RegisterProgIdInfo Sequence="4800" />
    <RegisterMIMEInfo Sequence="4900" />
    <WriteRegistryValues Sequence="5000" />
    <WriteIniValues Sequence="5100" />
    <WriteEnvironmentStrings Sequence="5200" />
    <RegisterFonts Sequence="5300" />
    <InstallODBC Sequence="5400" />
    <RegisterTypeLibraries Sequence="5500" />
    <SelfRegModules Sequence="5600" />
    <RegisterComPlus Sequence="5700" />
    <InstallServices Sequence="5800">VersionNT</InstallServices>
    <StartServices Sequence="5900">VersionNT</StartServices>
    <RegisterUser Sequence="6000" />
    <RegisterProduct Sequence="6100" />
    <PublishComponents Sequence="6200" />
    <PublishFeatures Sequence="6300" />
    <PublishProduct Sequence="6400" />
    <InstallFinalize Sequence="6600" />
    <RemoveExistingProducts Sequence="1410" />
    <MsiPublishAssemblies Sequence="6250" />
    <MsiUnpublishAssemblies Sequence="1750" />
</InstallExecuteSequence>

How do I fix this problem?


Chances are that you are attempting to do "stuff" during the InstallUISequence (which doesn't display from ARP or msiexec /x) and you are (incorrectly) requiring a User Interface and performing steps here, as opposed to performing them during the InstallExecuteSequence

If you inspect the two sequences using Orca, you should be able to identify the problematic actions.

0

精彩评论

暂无评论...
验证码 换一张
取 消