When we build wrappers, we usually check if the user has admin rights, if not, the wrapper will relaunch itself using an admin account.
We have some reg keys that need to be written to HKCU and because the application is elevated, all HKCU keys will be written to the admin account's hive.
Is there an easier way to write reg keys to HKCU other than applying the keys prior to Run as command?
HKCU Key Routine
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: HKCU Key Routine
Dear User,
I'm sorry but I'm not sure if I follow your question.
Do you want to write to HKCU (under the user account that launched the setup package ... not the admin) before executing a Run As command?
I'm correct?
Regards
I'm sorry but I'm not sure if I follow your question.
Do you want to write to HKCU (under the user account that launched the setup package ... not the admin) before executing a Run As command?
I'm correct?
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 27
- Joined: Thu Jul 26, 2012 2:23 pm
Re: HKCU Key Routine
I want to write to the HKCU thats currently logged into the machine.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: HKCU Key Routine
Dear User,
if it is that, try the following:
Regards
if it is that, try the following:
Code: Select all
Set Variable NATIVE_ENGINE to TRUE
Write Registry Key HKCU\\,
Set Variable NATIVE_ENGINE to FALSE
Regards
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
-
- Posts: 27
- Joined: Thu Jul 26, 2012 2:23 pm
Re: HKCU Key Routine
Thank you for the reply, but once the installer is elevated as a different user, will this write to the elevated user hive?
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: HKCU Key Routine
That's correct ... but probably you should require elevation only for your wrapped packages.
Regards.
Regards.
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 121 guests