title: What are some alternatives to RegistryKey.OpenBaseKey in .NET 3.5?
body: <p>I've been working on an installer package and using <a href="http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.openbasekey(v=vs.100).aspx" rel="noreferrer">RegistryKey.OpenBaseKey</a> to work with custom actions that either open and add/remove keys to/from the 64-bit registry or the 32-bit registry from an MSI package, but this requires me to install .NET Framework 4 on the target machine before running my installer, using a bootstrapper or something else, because <em>OpenBaseKey</em> was only introduced in .NET Framework 4. Ideally, I would like to target just .NET Framework 3.5 and still be able to modify either the 64-bit or 32-bit registry hives like in <em>OpenBaseKey</em>; then I wouldn't need .NET 4 and the overhead of installing it.</p>
  
  <p>Are there alternatives to <em>OpenBaseKey</em> for those of us who would not like to make .NET 4 a prerequisite? Something like P/Invoking a certain WinAPI method to kick this off, perhaps? I'm not sure what it would take.</p>