Still one of the most-asked questions we get via email is from developers
asking how they can write from the installer to HKEY_CURRENT_USER.

An application that is running elevated ("requireAdministrator" manifested)
should never write to HKEY_CURRENT_USER. Only "asInvoker" applications
should write to that registry key.

Because a typical installation program always has to run with administrator
execution level privileges, you can't write to the correct HKEY_CURRENT_USER
profile.

Let us assume, you have a "JoeUser" Standard User account under Vista or
Windows 7. Installation applications always run elevated -- an elevated
process is usually one that has been launched by someone with a Full
Administrator Token and runs with High Integrity Level Privileges
(administrator execution level privileges). If "JoeUser" starts the
installation, UAC determines that the Current User does not have a token of
sufficiently high Integrity Level and the Credentials Prompt asks the user
to provide a username and password of someone who has sufficient rights.
Windows will then create the necessary token for that user and uses it to
elevate the process so you can now continue with the installation. Please
note that you are on a completely different profile after the elevation.
You have switched from the "JoeUser" profile to the "Administrator" profile!
In other words, you do not write to the "JoeUser" HKEY_CURRENT_USER registry
key but to the Administrators key.

What you can do is the following: you create a simple "asInvoker" helper
application with SetupBuilder (or Clarion, or Visual Studio, or whatever).
This helper application can write to HKEY_CURRENT_USER -- you start that
helper from your elevated running installer with the "Launch non-elevated
under UAC" Run Program option.

Or even better, write to HKEY_CURRECT_USER directly from your own (asInvoker
manifested) application.

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

SetupBuilder is Windows installation -- "point. click. ship"

-- Official Comodo Code Signing and SSL Certificate Partner