title: wix code to create msi and install it on already installed application
body: <p>I have developed a wix code to create a msi for my company's application.when i install the msi on the system,if already the older version say 2.1.9115  of that application is present, it is not updating on it and installing the newly created msi.It is installing seperately and control panel shows the two versions of application. Is it upgrading of the product is the solution for my problem?.My code is</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"&gt;
  
  
  &lt;Product Name='smart viewer' Id="*" Language='1033' Codepage='1252' Version='2.0.0'
  Manufacturer='company' UpgradeCode='12345678-1234-1234-1234-111111111111'&gt;
  
  &lt;Package Keywords='Installer,MSI' InstallerVersion='100' Languages='1033'
       Compressed='yes' SummaryCodepage='1252'/&gt;
  &lt;Media Id="1" Cabinet="myapp.cab" EmbedCab="yes" /&gt;
  
  &lt;Directory Id="TARGETDIR" Name="SourceDir"&gt;
      &lt;Directory Id="ProgramFilesFolder"&gt;
          &lt;Directory Id="INSTALLDIR" Name="my file"&gt;
              &lt;Directory Id="INSTALLFOLDER" Name="my folder"&gt;
              &lt;/Directory&gt;
          &lt;/Directory&gt;
      &lt;/Directory&gt;
  &lt;Directory Id="ProgramMenuFolder"&gt;
      &lt;Directory Id="ApplicationProgramsFolder" Name="ProgramsFolder"/&gt;
      &lt;/Directory&gt;
  &lt;/Directory&gt;
  
  &lt;DirectoryRef Id="INSTALLFOLDER"&gt;
  &lt;Directory Id="DesktopFolder" Name="Desktop"/&gt;
  &lt;Component Id='MainExecutable' Guid='*'&gt;
      &lt;File Id='ExecutableFile' Name='my.exe' DiskId='1' Source='$(var.Sandbox)\Windows\release\my.exe' KeyPath='yes'&gt;
          &lt;Shortcut Advertise="yes" Id="MyProductDesktopShortcut" Directory="DesktopFolder"  Name="smart Viewer" WorkingDirectory="INSTALLFOLDER" Icon="Icon.exe"&gt; &lt;Icon Id="Icon.exe" SourceFile="$(var.Sandbox)\Installer-Win\Icon.ico"/&gt;
          &lt;/Shortcut&gt;
          &lt;Shortcut Id="startmenu" Advertise="yes"  Directory="ApplicationProgramsFolder"   Name="smart Viewer"  WorkingDirectory="ProgramMenuFolder" Icon="Icon.exe"&gt; &lt;Icon Id="Icon1.exe" SourceFile="$(var.Sandbox)\Installer-Win\Icon.ico"/&gt;  
          &lt;/Shortcut&gt;
      &lt;/File&gt;
  &lt;RemoveFolder Id="DeleteShortcutFolder" Directory="ApplicationProgramsFolder"
  On="uninstall" /&gt;
  &lt;/Component&gt;
  </code></pre>