title: VBScript to refresh Desktop in Wix or MSI
body: <p>My installer creates the reg key under HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace which creates an icon on the desktop during installation but after uninstallation, that icon stays until I press F5. 
  So I googled and found it from <a href="http://www.computerperformance.co.uk/ezine/ezine89.htm#Version_2_-_SendKeys_Refreshes_your_Desktop_" rel="nofollow">here</a>, so I added :</p>
  
  <pre><code>&lt;CustomAction Id="CA_RefreshDesktopVB" Script="vbscript"&gt;
  &lt;![CDATA[
      Set WSHShell = CreateObject("WScript.Shell") 
      strDesktop = WSHShell.SpecialFolders("Desktop") 
      WSHShell.AppActivate strDesktop
      WSHShell.SendKeys "{F5}"
  ]]&gt;
  &lt;/CustomAction&gt;
  
  &lt;InstallExecuteSequence&gt;
  ...
  &lt;Custom Action="CA_RefreshDesktopVB" OnExit="success"/&gt;
  </code></pre>
  
  <p>However, it didn't refresh when the uninstallation finished. Did I do something wrong or is this simply beyond VB Script?</p>