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   [ - ] Hide Comments


Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity


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.
Answered 01/30/2008 by: yarborg
Blue Belt

Please log in to comment
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'.
Answered 01/30/2008 by: VBScab
Red Belt

Please log in to comment
Only HKLM RunServices is acted on before a user logs in, all other user or machine Run keys launch after login..
Answered 01/30/2008 by: Tone
Second Degree Blue Belt

Please log in to comment