llloyd Posted November 16, 2005 Posted November 16, 2005 I need to get a bunch of registry keys into HKCU for all users. From what I've been able to find through google/searching this board my understanding is that if I get my keys into HKCU early enough in the installation process they will be applied to all users. Last night I tried to use runonceex and unfortunately only the administrator user and no subsequently added users got the keys, so apparently that first logon is too late.So when is the correct time? If I put the registry keys directly into my RunOnceEx.cmd (executed at T12 correct?) will that be early enough?PS how come in the RunOnceEx.cmd samples it uses the reg add command, wouldnt it be easier to just regedit /s a .reg file at that point? or have the files not been copied off the cd yet.
jbm Posted November 16, 2005 Posted November 16, 2005 The runonceex.cmd is entering keys in the runonceex key in the registry.These will be ran on the first boot. If you want you can place thisline at the end of you runonceex.cmd and it will execute the programsat t12.start /wait rundll32.exe iernonce.dll,RunOnceExProcessor you can call another cmd file in cmdlines.txt using regedit /s.Or even using regedit in you runonceex.cmd would work.as long as the registry entries are applied before the first bootthey will be applied to all users
MHz Posted November 17, 2005 Posted November 17, 2005 So when is the correct time? If I put the registry keys directly into my RunOnceEx.cmd (executed at T12 correct?) will that be early enough?PS how come in the RunOnceEx.cmd samples it uses the reg add command, wouldnt it be easier to just regedit /s a .reg file at that point? or have the files not been copied off the cd yet.Do it from Cmdlines.txt as mentioned here. HKCU entries will go to HCU for all accounts usage. This happens at T-12.RunOnceEx.cmd is different to your original question. RunOnceEx.cmd adds entries into the RunOnceEx key for installing applications at 1st logon. RunOnceEx.cmd is no good as a reg file as you cannot use batch commands like creating a %cdrom% variable for example.
Bendes Posted November 17, 2005 Posted November 17, 2005 Or you can also do this :DefaultUser.cmd:@ECHO OFFREG.EXE LOAD HKLM\DEFAULT "C:\Documents and Settings\Default User\NTUSER.DAT"REGEDIT.EXE /S Default.regREG.EXE UNLOAD HKLM\DEFAULTDefault.reg:Windows Registry Editor Version 5.00[HKEY_CURRENT_USER\Software\...]"Value"="Data"[HKEY_LOCAL_MACHINE\DEFAULT\Software\...]"Value"="Data"
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now