Run script once for each user

M

Mikrodots

Hello,

I am trying to setup a script to run once for each user that logs on whether
they are a new user or an existing user. I tried the runonce registry keys
but they only seem to work for the next logon, not for each users logon. Or
they work for only new users; I'm not even sure at this point. Hopefully
I'm missing something simple...

The script I'm running sets the screen saver values (as well as 50 other
registry values). I want all users to have the same screen saver, it seems
this has to be done in the HKCU keys on a per user basis...

This is getting rolled out to hundreds of XP machines across the US that are
not domain members, so Group Policy is not an option and it has to be fully
automated.

Could anyone point me in the right direction?

(Please note I am trying to cross-post this in
microsoft.public.scripting.vbscript and microsoft.public.win2000.registry
not create two threads, so please no flames if I messed it up )

Thanks
Mike
 
T

Torgeir Bakken \(MVP\)

Mikrodots said:
Hello,

I am trying to setup a script to run once for each user that logs on whether
they are a new user or an existing user. I tried the runonce registry keys
but they only seem to work for the next logon, not for each users logon. Or
they work for only new users; I'm not even sure at this point. Hopefully
I'm missing something simple...

The script I'm running sets the screen saver values (as well as 50 other
registry values). I want all users to have the same screen saver, it seems
this has to be done in the HKCU keys on a per user basis...
Hi

Here is my suggestion:

Put the script in HKLM Run registry key, and let it start with
looking for a registry marker/flag (represented with a registry
value) in the HKCU registry branch (e.g.
HKCU\SOFTWARE\<your company name here>\<some marker>). If the
marker is found, quit. If not, do the job, and then write the
marker registry value so the script will only be run once.
 
T

Torgeir Bakken \(MVP\)

Mikrodots said:
Hello,

I am trying to setup a script to run once for each user that logs on whether
they are a new user or an existing user. I tried the runonce registry keys
but they only seem to work for the next logon, not for each users logon. Or
they work for only new users; I'm not even sure at this point. Hopefully
I'm missing something simple...

The script I'm running sets the screen saver values (as well as 50 other
registry values). I want all users to have the same screen saver, it seems
this has to be done in the HKCU keys on a per user basis...
Hi

Here is my suggestion:

Put the script in HKLM Run registry key, and let it start with
looking for a registry marker/flag (represented with a registry
value) in the HKCU registry branch (e.g.
HKCU\SOFTWARE\<your company name here>\<some marker>). If the
marker is found, quit. If not, do the job, and then write the
marker registry value so the script will only be run once.
 

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