Jump to content

How to make a runonce for every new user


Recommended Posts

Hi,

first of all, sorry if this topic has been seen already, but after a long search on the forum, i did not find my solution.

My cd is almost finished, except that i would like to apply a reg tweak for every new user created, and this even if the user is created 1 year later. I want that runs only once, and for the user entering its session for the first time.

So my question is how to make it simple ? I tryed to apply a runonce method, but it it does not work. It even does not launch any .cmd

I tryed to import in the DEFAULT USER, but did not work.

Any help woudl be appreciated.

Thx

Weeb,

Link to comment
Share on other sites


Forget using runonce. Runonce is a machine setting (HKLM) - not a user setting. If there was a user level (HKCU) runonce registry location you could just load up a registry file during the cmdlines.txt phase of setup.

Just create a CMD script (batch file) to do all the things you want. At the very end of the batch file have it delete itsself (this is easy to do, and supprisingly - it works). Then, simply place this cmd file in the default user startup (%ALLUSERPROFILE%\..\Default User\Start Menu\Programs\Startup).

When new users logon for the first time they will get a copy of the batch file from the Default User profile. The batch file will run - and delete itsself - never to be seen by that user again. The same will happen for any new account logons to that PC. Just what you wanted.

And besides - batch files are a hell of alot easier than runonce entries

Link to comment
Share on other sites

Keep in mind one thing when using this technique:

The cmd file will run under the users context. If the user does not have admin rights don't try and do something like install drivers, it will fail.

Link to comment
Share on other sites

I have this working for every user but only for first login

reg load HKLM\Test c:\docume~1\defaul~1\ntuser.dat

reg add HKLM\Test\Software\Microsoft\Windows\CurrentVersion\RunOnce /V 01 /t REG_SZ /D "whatever command"

reg unload HKLM\Test

I add this during my build and as a user logs in they get however many commands I have defined to run.

R

Link to comment
Share on other sites

What i proposed will run once for each user and is included in the NTUSER.dat file. It has nothing to do with the default user HKCU config...

It allows commands to be run the first time a user logs into the machine (who dosent have a profile yet)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...