title: How can I set this registry value from my installer
body: <p>In my <em>.msi</em> installer package, I have a C# custom action that writes a registry value in:</p>
  
  <pre><code>HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
  </code></pre>
  
  <p>The custom action is deferred because I need elevated privileges for some of the keys I am trying to install. However, because it is deferred, this action writes to the current user of the system account since it is launched with elevated permissions, so my registry value actually gets written in:</p>
  
  <pre><code>HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run
  </code></pre>
  
  <p>How can I get the installer to write this registry value into the registry of the user who launched the installation package instead of the system account's registry?</p>