Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Add script to RunOnce key of each user's HKU hive

158 views
Skip to first unread message

werethegoodguys

unread,
Sep 19, 2007, 3:03:44 PM9/19/07
to
Hello,

I have googled the existing posts and perhaps am using the wrong
search terms. If my question has already been addressed, perhaps one
could point me there?

The immediate need is to step through each user's HKU hive to write to
the HKU\Software\Microsoft\Windows\CurrentVersion\RunOnce key. I can
make this happen for the default user but repeating the process for
each user on the pc eludes me.

Thank you.

T_Condit

unread,
Sep 19, 2007, 3:32:03 PM9/19/07
to
I believe that information is in each of the users ntuser.dat. I could be
wrong though.

You could place a script in the all users startup that when run it verifies
if they have processed your run once script. Place another reg key to verify
against, or just keep a log/txt file on the pc.

Good luck.

JakeDAHS

unread,
Sep 19, 2007, 9:08:54 PM9/19/07
to
On Sep 19, 3:32 pm, T_Condit <TCon...@discussions.microsoft.com>
wrote:
> > Thank you.- Hide quoted text -
>
> - Show quoted text -

There may be a better way to do it. I've used this process to do a
number of different profiles, on a number of machines, in the
ntuser.dat of each profile. You can create a script to do checks
first, ping, enumerate all profiles on the machine, check for
ntuser.dat etc...

then use reg.exe to load the ntuser.dat into your hklm hive as a key
write the key you need using a saved .reg file
unload the ntuser.dat ( must remember to unload it)

this is a piece of a powershell script i had used to update a citrix
registry key. Not code to use, but at least gives you an example to
look at

note that when you create the .reg file to import that it must match
the same as on your machine
so the keys in HCKICitrix.reg contain the path hklm\ProfileTemp
\Software.....

$x = (reg load hklm\ProfileTemp "\\computer\documents and
settings\user\ntuser.dat")
$x = (reg delete "hklm\ProfileTemp\Software\Citrix\Program
Neighborhood Agent" /f)
$x = (reg import c:\temp\HKCUCitrix.reg)

$HKCUCitrix = (reg query "hklm\ProfileTemp\software\citrix
\program neighborhood agent") | out-string
reg unload hklm\ProfileTemp)


Anyway hope that helps.

-J
www.pooradmin.com

0 new messages