title: Uninstall out-of-browser silverlight application programmatically
body: <p>How to uninstall out-of-browser silverlight 4 application programmatically instead of using the contextmenu (e.g. if I want to replace the context menu)?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I have found in <a href="http://timheuer.com/blog/archive/2010/03/25/using-sllauncher-for-silent-install-silverlight-application.aspx" rel="nofollow noreferrer">"Installing Silverlight applications without the browser involved"</a> how to uninstall by calling the command-line:</p>
  
  <blockquote>
    <p>"%ProgramFiles%\Microsoft Silverlight\sllauncher.exe" /uninstall /origin:silverlight.net/content/samples/apps/…</p>
  </blockquote>
  
  <p>This can be used in:-</p>
  
  <pre><code> dynamic cmd = AutomationFactory.CreateObject("WScript.Shell");
   cmd.Run(run, 1, true);
  </code></pre>
  
  <p>Is there any better solution?</p>