title: MSI keeps installing older version when called with silent argument
body: <p>I am having a very annoying problem. </p>
  
  <p>I have an application with a setup project included in the solution that builds a .msi. I use VS 2008. 
  I have incremented the version of the setup project - selected the project in solution explorer, pressed F4, and incremented version, and modified "Manufacturer" and "Author" fields. I then rebuilt the application and the setup project also afterwards. </p>
  
  <p>The most bizarre thing happens then: when I run the resulting .msi file in a non-silent manner, it installs the latest version in the correct C:\Program Files (x86)[Manufacturer]\ path. </p>
  
  <p>But when I call the setup file from the application code, with the silent arguments:</p>
  
  <pre><code>processStartInfo.Arguments = "/i " + "\"" + file + "\"" + "/qn";
  </code></pre>
  
  <p>...then it installs the previous version (the one before incrementing the setup project version) and also it installs it in the old manufacturer path.  </p>
  
  <p>Is the .msi setup file storing two versions inside it that hold different variables/ setup properties?! I am stumped and very annoyed, I have now lost four hours on this issue. 
  I have deleted temp files. I have verified the correct .msi is in the correct path a dozen times. </p>
  
  <p>I need to force the .msi to consider the updated setup properties when installing with silent argument as well. </p>
  
  <p>Here is the code from the application that calls the setup:</p>
  
  <pre><code>    private static void RunSetupFile()
      {
          string file = Path.Combine(Utils.GetAppTempPath(), Utils.ApplicationUpdate_SetupFileName);
          ProcessStartInfo psi = new ProcessStartInfo(Path.Combine(Environment.SystemDirectory, "msiexec.exe"));
          psi.WindowStyle = ProcessWindowStyle.Hidden;
          psi.Arguments = "/i " + "\"" + file + "\"" + "/qn"; 
          psi.UseShellExecute = true;
          psi.Verb = "runas";
          try
          {
              Process process = Process.Start(psi);
          }
          catch (System.ComponentModel.Win32Exception)
          {
          }
      }
  </code></pre>
  
  <p>And below is the code that calls the above method, perhaps here is the culprit:</p>
  
  <pre><code>    public static void InitializeAppUpdate()
      {
          DownloadNewSetupVersionFromServer();
          RunSetupFile();
          Utils.CloseApplication();
      }
  </code></pre>
  
  <p>Thank you for any idea. Let me know if I should provide more details.</p>