I am fairly new to WiX and installers so please bear with me on this question.
I have created a WiX Setup project to install my C# application and I have been able to get it to successfully install with the folder in the Programs Files folder and shortcuts to the desktop and Applications Program folder.
My problem is when I uninstall the program either using the msi the setup project generated or the uninstall option in add/remove programs the shortcuts still remain and the application is still in the Programs Files folder. Here is my code:
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Update Tool" />
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Update Tool" />
</Directory>
<Directory Id="DesktopFolder" Name="Desktop"/>
</Directory>
<Fragment>
<DirectoryRef Id="ApplicationProgramsFolder">
<Component Id="ApplicationShortcut" Guid="*">
<Shortcut Id="ApplicationStartMenuShortcut"
Name="Update Tool"
Description="Update Tool"
Target="[INSTALLFOLDER]Updater.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY"
Icon="icon.ico"/>
<RemoveFile Id="remove_menushortcut" Name="Update Tool" On="uninstall"/>
<RemoveFolder Id="RemoveApplicationProgramsFolder" Directory="ApplicationProgramsFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\Update Tool" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
<DirectoryRef Id="DesktopFolder">
<Component Id="ApplicationShortcutDesktop" Guid="*">
<Shortcut Id="ApplicationDesktopShortcut"
Name="Update Tool"
Description="Update Tool"
Target="[INSTALLFOLDER]Updater.exe"
WorkingDirectory="APPLICATIONROOTDIRECTORY"
Icon="icon.ico"/>
<RemoveFile Id="remove_applicationshortcut" Name="Update Tool" On="uninstall"/>
<RemoveFolder Id="RemoveDesktopFolder" Directory="DesktopFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Microsoft\Update Tool" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</DirectoryRef>
Can anyone point out what it is I am doing wrong or what I need to have in? Thanks