Jump to content

Recommended Posts

Posted

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.


Posted

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 this

line at the end of you runonceex.cmd and it will execute the programs

at t12.

start /wait rundll32.exe iernonce.dll,RunOnceExProcess

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

they will be applied to all users

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

Posted

Or you can also do this :

DefaultUser.cmd:

@ECHO OFF
REG.EXE LOAD HKLM\DEFAULT "C:\Documents and Settings\Default User\NTUSER.DAT"
REGEDIT.EXE /S Default.reg
REG.EXE UNLOAD HKLM\DEFAULT

Default.reg:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\...]
"Value"="Data"

[HKEY_LOCAL_MACHINE\DEFAULT\Software\...]
"Value"="Data"

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...