Page 1 of 1

Modify RunOnce registry for originating user

Posted: Tue May 07, 2013 8:12 pm
by tofutim
Is it possible to make an HKCU change for the original (non-Admin) user?

Update. I am trying to RunOnce even though the installer is elevated. I found that another possibility is using HKLM RunOnce, however, when I try to set the registry as Admin, somehow HKLM RunOnce (SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce) is never written, although if I change it to HKCU it does get written (but in the Administrator's HKCU).

Can anyone shed light on this? How can I write to HKLM?

Update 2. It turns out that it is written - just redirected to Wow6432Node. Also, Standard users cannot execute from HKLM RunOnce apparently, which would explain why the startup never happens. Somehow I still need to get the HKCU for the original user. Can I do this from InstallAware directly or do I need to do a Run Program As and write a script to do the registry for HKCU?

Re: Modify RunOnce registry for originating user

Posted: Wed May 08, 2013 9:27 am
by FrancescoT
Dear Tofutim,

ADMIN users only have access to modify restricted System areas as registry keys under the HKLM root.
There isn't no way to modify this behaviour, unless your process is elevated to Admin rights.

Once elevated, the process is not executed under the original user context, but under the user context where the process has been elevated.

Hope this clarify your doubt.

Regards.