/build/static/layout/Breadcrumb_cap_w.png

RUN key under HKLM and HKCU

What is the difference between Run key under HKLM and HKCU( in terms of execution mode)?
Also which one we are supposed to use in MSI package if something needs to be run at every logon.




0 Comments   [ + ] Show comments

Answers (3)

Posted by: yarborg 16 years ago
Blue Belt
0
HKLM is for all users. HKCU would only apply to a specific user. Alternatively you can set a scheduled task using schtasks.exe if you need to run under elevated priviledges.
Posted by: anonymous_9363 16 years ago
Red Belt
0
ORIGINAL: yarborg
HKLM is for all users.
<nitpick>Not quite. The HKLM 'Run' key is accessed and its contents acted upon before any user logs in and is independent of any such log-in. To all intents and purposes, it amounts to the same thing in practice, of course, but the distinction might be important in certain circumstances.</nitpick>

The original post is a little vague, particularly when talking about package deployment. There are a couple of things to consider. One, you may want to consider placing actions which need to occur at login time into a login script; two, you may be better off using Active Setup. It depends on what is meant by 'something needs to be run'.
Posted by: Tone 16 years ago
Second Degree Blue Belt
0
Only HKLM RunServices is acted on before a user logs in, all other user or machine Run keys launch after login..
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ