Maybe I should have called this "Why can't I access HKEY_CURRENT_USER on Win9x/ME during logon"
...or Why doesn't my script work during logon but works if I run it after logon"
...or "Why does... <place your problem here> ...only work after I reboot or logoff and logon again".
ScriptLogic has an Article T1056 that explains how the various Run, RunOnce, RunServices, RunServicesOnce, and RunOnce\Setup registry keys relate to each other, the Startup folder and logon scripting. It also describes the order in which these events are processed.
This is "have to have" information to plan out and troubleshoot your logon scripts, particularly when you have a mix of client OS. One must also consider whether the logon script runs sync or async. See also, the FAQ
W2k - Keep the Window visible on login?
After reviewing the Article T1056 you will see why it is better to use true policies rather than reg hacks. You should also have an understanding of why scripts are often pushed to the RunOnce key (thought for another FAQ topic).
[edit]They keep changing the URL for the article. Had to search on the title "Explanation of how the various Run, RunOnce, RunServices, and RunServicesOnce registry keys are sequenced with ScriptLogic" to find it.
Edited by Les (2011-11-18 05:12 PM)
Edit Reason: URL changed
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.