7

I am working on an installer (MSI, Wix) for MVVM Light and have an issue. I need to run devenv.exe /setup on install and on uninstall to add/remove templates to the New Project menu. While we nailed the syntax on install, we are unable to find the correct syntax to run this on uninstall.

This is what we have:

<InstallExecuteSequence>
    <Custom Action='UpdateVS2010Templates'
            After='InstallFiles'>VS2010EXISTS</Custom>

    <Custom Action='UpdateVS2010TemplatesUninstall'
            After='RemoveFiles'>REMOVE = "All"</Custom>
</InstallExecuteSequence>

with

<CustomAction Id="UpdateVS2010Templates"
                Impersonate="no"
                Execute="deferred"
                Directory="INSTALLLOCATION"
                ExeCommand='"[VS10INSTALL]\Common7\IDE\DEVENV.EXE" /SETUP'
                Return='ignore' >
</CustomAction>

<CustomAction Id="UpdateVS2010TemplatesUninstall"
                Impersonate="no"
                Execute="deferred"
                Directory="INSTALLLOCATION"
                ExeCommand='"[VS10INSTALL]\Common7\IDE\DEVENV.EXE" /SETUP'
                Return='ignore' >
</CustomAction>

Can anyone indicate what the correct syntax would be?

thanks! Laurent

LBugnion
  • 6,672
  • 2
  • 24
  • 28
  • More information: I tried executing a dummy custom action (MessageBox.Show pretty much) and it works on install but not on Uninstall. So it is really the Custom action that doesn't get executed, not the Setup command itself. – LBugnion Jul 07 '11 at 11:24

3 Answers3

8

This is functionality that comes with WiX. Replace all that authoring and your custom RegistrySearch with:

<CustomActionRef Id="VS2010Setup" />
Bob Arnson
  • 21,377
  • 2
  • 40
  • 47
0

Have you tried devenv /installvstemplates after uninstalling the files?
http://msdn.microsoft.com/en-us/library/xee0c8y7.aspx

Rami A.
  • 10,302
  • 4
  • 44
  • 87
0

Any chance it's a case sensitivity issue?

Try "ALL" instead of "All" or REMOVE ~= "ALL" as Rob suggests.

Community
  • 1
  • 1
si618
  • 16,580
  • 12
  • 67
  • 84