HKCU Key Routine

Got a problem you cannot solve? Try here.
jdeleon7010
Posts: 27
Joined: Thu Jul 26, 2012 2:23 pm

HKCU Key Routine

Postby jdeleon7010 » Fri Aug 10, 2012 9:11 am

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?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: HKCU Key Routine

Postby FrancescoT » Fri Aug 10, 2012 9:27 am

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
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

jdeleon7010
Posts: 27
Joined: Thu Jul 26, 2012 2:23 pm

Re: HKCU Key Routine

Postby jdeleon7010 » Fri Aug 10, 2012 12:30 pm

I want to write to the HKCU thats currently logged into the machine.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: HKCU Key Routine

Postby FrancescoT » Mon Aug 13, 2012 6:54 am

Dear User,

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

jdeleon7010
Posts: 27
Joined: Thu Jul 26, 2012 2:23 pm

Re: HKCU Key Routine

Postby jdeleon7010 » Mon Aug 13, 2012 9:34 am

Thank you for the reply, but once the installer is elevated as a different user, will this write to the elevated user hive?

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: HKCU Key Routine

Postby FrancescoT » Mon Aug 13, 2012 10:02 am

That's correct ... but probably you should require elevation only for your wrapped packages.

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


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 121 guests