Write in RunOnce for all the users

  • Thread starter Thread starter vc
  • Start date Start date
V

vc

Hi all,

I have a setup that should be run first by admin to install all the
common components, and then I would like that every user that logs on
that machine to get the setup launched only once.

In other words I would like when installing the admin part to write in
the registry in RunOnce key the installation application, but I don't
know how can I write this in RunOnce for *all the users*.

If somebody know how ...
Thanks in advance,
Viv
 
vc said:
Hi,

This should work for WinNT4, Win2000 and WinXP ... I don't use Active
Directories ...

You need to use something that can control each PC like AD or System
Management Server or other enterprise wide deployment systems.

You could create a setup using a tool like Wise or Installshield that when
the user double clicks on the icon it either sets the reg value you want or
initiates the install, however, that method depends on the user to launch
the icon.
 
I have a setup that should be run first by admin to install all the
common components, and then I would like that every user that logs on
that machine to get the setup launched only once.
In other words I would like when installing the admin part to write in
the registry in RunOnce key the installation application, but I don't
know how can I write this in RunOnce for *all the users*.

I don't recall the proper placement for NT platforms, but for W2K and
XP all you need to do is to insert the desired RunOnce entry in the
unloaded hive "C:\Documents and Settings\default user\ntuser.dat".

Note that this is **NOT** the same as the always-present Registry
entry HKU\.default which controls the computer's behavior when nobody
is logged on.

This hive is copied to a newly-created profile when a userid logs onto
the computer for the first time, and becomes the HKCU hive for that
userid. After the user's profile is created any RunOnce entries will
be processed as part of the same login, which gives you what you're
asking for.

Joe Morris
 
Joe Morris said:
I don't recall the proper placement for NT platforms, but for W2K and
XP all you need to do is to insert the desired RunOnce entry in the
unloaded hive "C:\Documents and Settings\default user\ntuser.dat".

Note that this is **NOT** the same as the always-present Registry
entry HKU\.default which controls the computer's behavior when nobody
is logged on.

This hive is copied to a newly-created profile when a userid logs onto
the computer for the first time, and becomes the HKCU hive for that
userid. After the user's profile is created any RunOnce entries will
be processed as part of the same login, which gives you what you're
asking for.

What I think the OP really wants is how to do that not were it's done. So
you need to expand on how to add the entry to the ntuser.dat.
 
Viv, first, make sure that you're looking at *EVERYTHING* in Explorer.
Make sure Show Hidden files is set; Disable 'Hide Protected OS Files'
and 'Hide File Extensions for Known Types'.

Then go to Start --> Run. Type 'regedt32'. When it opens, minimize all
the windows but HKEY_USERS. Go to File --> Load Hive. browse to the
profile location (C:\WINNT\Profiles\DefaultUser for NT4, C:\Documents
and Settings\Default User for 2k. I think it's the same for XP; not
*sure*). Open NTUSER.DAT. It will ask you for a label. Type
something--doesn't matter what. You'll see that label appear as a key
under HKEY_USERS. Decend into that subkey till you get to RunOnce. Put
in your script call.

***IMPORTANT***
When you get that done, click once up on the subkey you loaded under
HKEY_USERS, go to File --> Unload Hive... If you don't unload the hive,
when users try to log in, the OS will report that DefaultUser\NTUSER.DAT
is locked by another process and won't allow the creation of new profiles.

HTH!

(j)
James
 
If you are using an NT40 domain, I believe you can use system policy editor.
The policy would probably work for both NT and 2K.
 
Back
Top