unable to unGAC

Topics: General Questions, Getting Started/Beginner, Server Deployment, Tips and Tricks
Jun 2, 2011 at 8:16 PM

Hi

 

I have created a wix with BTDF but I am not able to unGAC. My msi creates a Undeploy Shortcut in program files for my application.

In order to uninstall I am forced to use the undeploy shortcut in program files (to unGAC) and after I need to launch Control Panel\Programs and features in order to unistall it.

 

How I can setup my xml in order to avoid using the undeploy shortcut?

Which conditional flag I should use in order to include the unGAC when I launch the Control Panel\Programs and features in order to unisntall it?

 

Thank you so much (here is the code)

    <WixVariable Id="WixUILicenseRtf" Value="License.rtf" />    <WixVariable Id="WixUISupportPerUser" Value="0" />
    <SetProperty Id="DEPLOYMENTDIR" Value="[INSTALLDIR]\Deployment" Sequence="execute" After="InstallInitialize"/>    <Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />    <Property Id="LicenseAccepted" Value="1" />    <CustomAction      Id="LaunchApplication"      ExeCommand='CMD.EXE /C ""Deployment\Framework\DeployTools\UacElevate.exe" "Deployment\Framework\ServerDeployWizardMSI.bat" $(var.ProjectFilename)"'      Directory="INSTALLDIR" Impersonate="yes" Return="check" />
    <UI>      <UIRef Id="WixUI_InstallDir" />      <Publish Dialog="ExitDialog"          Control="Finish"          Event="DoAction"          Value="LaunchApplication">NOT Installed</Publish>    </UI>    <!-- <InstallExecuteSequence>         <Custom Action="LaunchApplication" After="InstallFinalize">NOT Installed</Custom>    </InstallExecuteSequence> -->
    <Property Id='ALLUSERS' Value='1' />        <!-- Version Upgrade Logic -->    <Upgrade Id="$(var.ProductUpgradeCode)">      <!-- Check for an older installed version and allow it to be automatically uninstalled            and the new version installed in its place. -->      <UpgradeVersion        Minimum="0.0.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" Property="NEWERPRODUCTFOUND" />            <!-- Check for a newer installed version -->      <UpgradeVersion Minimum="$(var.ProductVersion)" IncludeMinimum="yes" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" />    </Upgrade>
    <Condition Message="A later version of $(var.ProductName) is already installed. Setup will now exit.">      NOT NEWERVERSIONDETECTED OR Installed    </Condition>        <InstallExecuteSequence>      <RemoveExistingProducts After="InstallInitialize"/>    </InstallExecuteSequence>    <!-- Version Upgrade Logic -->
    <Media Id="1" EmbedCab="yes" Cabinet="BizTalkSolution.cab" />  </Product>

Coordinator
Jun 2, 2011 at 9:02 PM

Hi,

You should always use the Deployment Framework's undeploy process (usually accessed through the Start menu shortcut) to undeploy.  The wizard UI allows you to select whether this is the first server, in which case the app will be shut down and removed from the management database.  When the checkbox is in the opposite state, the main work is DLL removal from the GAC.  Regardless, you should always go through the Framework's undeploy command.

As for auto-firing that process when the MSI is uninstalled, I don't have a simple answer for you.  I've made a couple of attempts in the past at launching it during the MSI uninstall and never got it working properly.  Unfortunately it's not something that I'll have time to address in the forseeable future, so if you do work out a solution I would be happy to hear it!

Incidentally, after you run the undeploy you should not need to manually uninstall the MSI and install the new MSI.  It should be able to auto-upgrade by simply installing the new MSI, if you update the MSI version properties as noted in the comments in your .btdfproj.

Thanks,
Tom