Write in RunOnce for all the users

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
 
V

vc

Hi,

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

Robert R Kircher, Jr.

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

Joe Morris

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
 
R

Robert R Kircher, Jr.

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

James Williams

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
 
J

Jonathan Shapiro

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top