title: Visual studio 2010 setup project [ProductName]
body: <p>C#, Visual studio 2010</p>
  
  <p>I have an application project and a Setup project connected to the application.
  In the Setup projects property I have setthe ProductName property to MyApp.</p>
  
  <p>I have two links (Setup project) in the applications folder, 
  one for starting the project and one for uninstalling</p>
  
  <p>I am using the technique of creating a uninstaller link in the applications folder by 
  starting my application with a flag and the applications Product code like this
  --uninstall [ProductCode]</p>
  
  <ol>
  <li><p>I can not use [ProductName] as the name of the link to start the application, why is that?
  If I do, the Setup project will create a link in the application folder under the start menu 
  with the name [ProductName] instead of "MyApp".</p></li>
  <li><p>How do I localize the "remove link", today I name the uninstaller link to "Remove MyApp"?
  I was hoping that is was possible to do something like this "strings.Remove [ProductName]"</p></li>
  <li><p>Is it possible to connect the Setup project with my MyApp project in such way that the 
  Setup project gets the application name, version number etc. from the MyApp project instead.
  Like this 
  Setup property <code>ProjectName = MyApp.properties.Application.AssemblyName</code></p></li>
  </ol>
  
  <p>/Stefan</p>
  
  <hr>
  
  <p>I see ,thanks for your answear</p>
  
  <blockquote>
    <p>Why aren't you using msiexec.exe command line</p>
  </blockquote>
  
  <p>I am using the msiexec, I am invoking it in my application App class like this</p>
  
  <pre><code>            sComLine = CommandLine.CL.get("uninstall"); // Check command line if the --uninstall [ProductCode] is given
              if (sComLine != null)
              {
                  string path = Environment.GetFolderPath(Environment.SpecialFolder.System);
                  System.Diagnostics.ProcessStartInfo uninstallProcess = new System.Diagnostics.ProcessStartInfo(path + System.IO.Path.DirectorySeparatorChar + "msiexec.exe", "/x " + sComLine);
                  System.Diagnostics.Process.Start(uninstallProcess);
                  System.Windows.Application.Current.Shutdown();
              }
  </code></pre>