Discussion Locked

Run a program once per new user logon

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Hello.I would like to be able to run a script one time and only when it is a new user that logs onto a machine.Is this possible? Is there a particular run key in the registry I need to focus on? I see some sites that talk about W2K and 98 but no XP. Any help would be appreciated. Thanks!

12 replies

by sbrown95

You need to load the script into the default user profile: "C:\Documents and Settings\Default User\Start Menu\Programs\Startup" That way it will run everytime a new user logs on. This profile is also were you can customize things like internet settings and custom desktop items for new users.

by shelli_2005

OMG I feel like a goofus...So obvious!
Boy is my face red!
How could I have missed that? I guess I was just making it harder than it had to be.Thanks so much for the reply I really appreciate it.

by shelli_2005

I may have spoke too soon, I need for the program to run only one time, at the new users initial logon and then not run again. The script is to setup the users email profile and printers so it only needs to run the very first time the user logs on.

by shelli_2005

I saw the Microsoft article and I had followed the instructions, not sure if it is different with 2K but in XPthere was no runonce key only a run key. I even tried manually creating the runonce key, and it didnt work.

by allthegoodnamesweregone

this should do it.

Place it in the startup folder of the default user profile as previously suggested. then just make the script delete itself using the %userprofile% variable instead of c:\documents and settings\default user.

i don't know if i explained that very well. do you follow me?

by winterfrost

"I saw the Microsoft article and I had followed the instructions, not sure if it is different with 2K but in XPthere was no runonce key only a run key. I even tried manually creating the runonce key, and it didnt work."

There is most definitely a RunOnce key in both Windows 2000 and XP. You may have been looking in the wrong place. Make sure you are looking it:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion

by shelli_2005

I know it sounds crazy but the HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce
key is not on the XP test machine I was using.And I tried manually creating again and no good. I even had another tech look to make sure Im not losing it...I did look on several other machines and the key was there. I guess my next step is to build a new XP vm and try again.

This discussion is closed to new replies.