Here is what I found. A non administrator user cannot write
HKEY_LOCAL_MACHINE keys.
you could add this line to the celestia.iss file, in the [Setup] section :
So the installer asks first if you want to become root, and if not, Celestia is well installed but the installation displays this message when trying to write HKCR entries (which are
HKEY_LOCAL_MACHINE\SOFTWARE\Classes keys) :
Answering "Ignore" finishes the installation normaly, Celestia works, but there is no file extension association.
Actually this method is not very great, nevertheless it works.
An other solution is to create a user profile within Celestia, an action executed the first time Celestia is run, modifying the
HKEY_CURRENT_USER\SOFTWARE\Classes. The installer can do that but:
it is still best to keep per-user actions in the installer to a minimum, and instead modify your application so that it can upgrade or regenerate per-user data as needed. This is because only one user is running the installer, but more than one may be running the application. If your only upgrade code is in the installer, other users will be left out in the cold.
Bare in mind, as mentioned before, neither an installer nor an uninstaller should touch HKEY_CURRENT_USER at all. If your application relies on some keys or values beeing created there during the setup process it will fail anyway if a different user logs on. Keys and values under HKEY_CURRENT_USER should only be created or removed by the application.
The uninstaller can't remove anything under HKEY_CURRENT_USER for other users. This is by Windows design. You can't change this. So why would you want to delete them for one user but not for others? It's best practice to just leave them as they are. As said, this is Windows design, and your uninstaller is not the first and the only one that will leave them behind, which is entirely the correct way. Microsoft don't give you a reliable way of deleting this data.
source :
http://www.vincenzo.net/isxkb/index.php?title=Installation_ConsiderationsBy the way, both keys HKCR and HKCU can be set by the installer for file association making a conditional installation, if HKCR fails for a non-admin user, only HKCU keys are set for the current user, using a "noerror" flag for HKCR keys so there is no error message. This is almost the same thing as "install for all users" or "install just for me" option in some installers.