This project is read-only.

Uninstall option not showing up

May 25, 2010 at 2:41 AM

Hi all,

Firstly, thank you for this awesome product.  I was able to create an install program for my project with the short tutorial that you have, with subfolders and all. 

The issue I'm having is that, once installed, there's no "uninstall" option.  No shortcuts, and not an entry in the Add/Remove Programs list.  When reinstalling, the set up tells me that it couldn't continue because it was already installed.  I was able to find and delete the entries in the registry.  Can someone tell me what I'm doing wrong?

I'm using Windows Vista x64

Below is the complete content of Files.wxs.  Thank you in advance

<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
  <Fragment>

    <!--
      Defined in Setup.wxs, the "TARGETDIR" is not actually created, it's just a crutch
      in WiX to allow the files to share a common root
    -->
    <DirectoryRef Id="TARGETDIR">

      <!--
        ProgramMenuFolder is a special name that resolves to the start menu folder.
        The files (see below) can indicate that they want a shortcut created in
        another folder. By defining this folder, we can make them put a shortcut
        into the start menu!
      -->
       <Directory Id='ProgramMenuFolder' Name='Programs'>
        <Directory Id='MyGameProgramMenuFolder' Name='ARViewer'>
          <Component Id="StartMenuEntriesComponent" Guid="5466C77E-1607-4883-8B22-B538AEA57FB3" DiskId="1">
            <RemoveFolder Id='MyGameProgramMenuFolder' On='uninstall' />          
            <RegistryValue
              Root='HKCU'
              Key='SOFTWARE\CLS\ARViewer'
              Type='string'
              Value='AR Viewer'
              KeyPath='yes'
            />
          </Component>
        </Directory>
      </Directory>



    	
    	
      <!--
        ProgramFilesFolder is a special name that is resolved to the system's
        programs folder. This entry makes sure that INSTALLDIR, displayed in
        directory selection dialog, initially points to "C:\Program files\MyGame".
        Note that this does not prevent the user from selecting an entirely
        different path like "D:\Games\MyGame".
      -->
      <Directory Id="ProgramFilesFolder" Name="PFiles">
 
        <!--
          Target directory you game will be installed to. Create more <Directory />
          elements below this one to create subdirectories or add <File /> elements
          to add files to a directory
        -->
        <Directory Id="INSTALLDIR" Name="ARViewer">

          <!--
            Any <File /> element must be contained in a <Component /> element.
            Components are entirely internal to the installs and group inseperable
            partS of your game. For example, you could have 4 components:
            "shared", "game", "editor" and "docs".

            An installer then sets up a series of features (see <Feature /> in Setup.wxs),
            where each feature points to a number of components. Following the previous
            example, two features named "game" and "editor" could be imagined where
            both point to the "shared" component and to their own component.
          -->
          <Component Id="GameRoot" Guid="668376E3-52D6-4b06-B512-03B4AECA4628" DiskId="1">


            <File
              Id="DirectShowLib2005" Name="DirectShowLib-2005.dll"
              Source="$(sys.SOURCEFILEDIR)/../Content/DirectShowLib-2005.dll"
            />
			<File
              Id="NyARToolkitCS" Name="NyARToolkitCS.dll"
              Source="$(sys.SOURCEFILEDIR)/../Content/NyARToolkitCS.dll"
            />
            <File
              Id="NyARToolkitCS.sandbox" Name="NyARToolkitCS.sandbox.dll"
              Source="$(sys.SOURCEFILEDIR)/../Content/NyARToolkitCS.sandbox.dll"
            />
            <File
              Id="NyARToolkitCSUtils" Name="NyARToolkitCSUtils.dll"
              Source="$(sys.SOURCEFILEDIR)/../Content/NyARToolkitCSUtils.dll"
            />
           	
            <File
              Id="GameExecutable" Name="ARViewer.exe" KeyPath="yes"
              Source="$(sys.SOURCEFILEDIR)/../Content/ARViewer.exe"
            >            	
              <!--
                Let the installer create a shorcut to this file in the start menu. There are
                several ways to do this. For some more in-depth explanation, visit this url: 
                
				http://blogs.technet.com/alexshev/pages/from-msi-to-wix-part-10-shortcuts.aspx
 			  -->
              <Shortcut
                Id="MyGameShortcut"
                Name="AR Viewer"
                Directory="MyGameProgramMenuFolder"
                Advertise="yes"
                WorkingDirectory="INSTALLDIR"
              />
            </File>
          </Component>
          
          
			<Directory Id="ContentFolder" Name="Content">

	          <Component Id="Content" Guid="5468DB59-7403-49c4-8FB2-9245107D6471" DiskId="1">

	            <File
	              Id="SpriteFont1" Name="SpriteFont1.xnb"
	              Source="$(sys.SOURCEFILEDIR)..\Content\Content\SpriteFont1.xnb"
	            />
				
	            <File
	              Id="camera_para" Name="camera_para.dat"
	              Source="$(sys.SOURCEFILEDIR)..\Content\Content\camera_para.dat"
	            />
				
	            <File
	              Id="patCCC" Name="patCCC.pat"
	              Source="$(sys.SOURCEFILEDIR)..\Content\Content\patCCC.pat"
	            />
				
	          </Component>
	
        			<Directory Id="ModelsFolder" Name="Models">

			          <Component Id="Models" Guid="7C2891D2-831C-420d-ACC3-B57FC74655D6" DiskId="1">
			            <File
			              Id="Engine" Name="Engine.xnb"
			              Source="$(sys.SOURCEFILEDIR)/../Content/Content/Models/Engine.xnb"
			            />
						<File
			              Id="heart" Name="heart.xnb"
			              Source="$(sys.SOURCEFILEDIR)/../Content/Content/Models/heart.xnb"
			            />
			            <File
			              Id="p1_wedge" Name="p1_wedge.xnb"
			              Source="$(sys.SOURCEFILEDIR)/../Content/Content/Models/p1_wedge.xnb"
			            />
			          </Component>
			
			        </Directory>
				
        			<Directory Id="texturesFolder" Name="textures">

			          <Component Id="textures" Guid="985F7617-5AE5-41cd-8FAF-4479385A7F76" DiskId="1">
			            <File
			              Id="wedge_p1_diff_v1" Name="wedge_p1_diff_v1.xnb"
			              Source="$(sys.SOURCEFILEDIR)/../Content/Content/textures/wedge_p1_diff_v1.xnb"
			            />
						<File
			              Id="wedge_p1_diff_v1_0" Name="wedge_p1_diff_v1_0.xnb"
			              Source="$(sys.SOURCEFILEDIR)/../Content/Content/textures/wedge_p1_diff_v1_0.xnb"
			            />
			          </Component>
			
			        </Directory>
        	
	        </Directory>
        </Directory>
      
      </Directory>

    </DirectoryRef>

  </Fragment>
</Wix>