title: Visual Studio (2010) Setup Project x64 - Remove registry key at install and add at uninstall
body: <p>I'm trying to create a setup project. 
  On install, I want it to create some registry keys and delete others.
  On uninstall, I want it to do the opposite.</p>
  
  <p>Regarding creation of keys on install and removing them on uninstall - no problem, it's built into the setup project.</p>
  
  <p>Problem is with removing keys at install (and adding them back at uninstall).</p>
  
  <p>The latter is not built into the setup project, so I had to use <a href="http://msdn.microsoft.com/en-us/library/d9k65z2d%28v=VS.100%29.aspx" rel="nofollow">Custom Action</a>.</p>
  
  <p>And here another problem reveals:
  The machine I'm installing on is Windows 7 <strong>64bit</strong>. I changed the setup project TargetPlatform to 64bit, and the custom action dll to target 64bit as well.</p>
  
  <p>The custom dll (which inherits <code>System.Configuration.Install.Installer</code> of course) is running 'regedit.exe' (with a .reg file as parameter) using <code>Process.Start</code>, but it doesn't matter how I 'play' with the target platforms, when I try to install it (double clicking the compiled setup project), it opens several msiexec.exe processes, some in 32bit (verified in ProcessExplorer), therefor my custom dll keep changing the SysWow64 sub nodes instead of the 64bit node (which is somewhere under HKEY_LOCAL_MACHINE).</p>
  
  <p>Any way to perform this with the VS setup project and not moving to a different kind of installer?</p>