webservices Posted November 2, 2004 Posted November 2, 2004 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 .cmdI tryed to import in the DEFAULT USER, but did not work.Any help woudl be appreciated.ThxWeeb,
Noise Posted November 2, 2004 Posted November 2, 2004 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
webservices Posted November 3, 2004 Author Posted November 3, 2004 @Nois3thanks, i will give a try, but i am sure that was what i was looking for.One more time, this forum rocks and thank you Nois3.Weebs,
Noise Posted November 3, 2004 Posted November 3, 2004 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.
rdalling Posted November 3, 2004 Posted November 3, 2004 I have this working for every user but only for first loginreg load HKLM\Test c:\docume~1\defaul~1\ntuser.datreg add HKLM\Test\Software\Microsoft\Windows\CurrentVersion\RunOnce /V 01 /t REG_SZ /D "whatever command"reg unload HKLM\TestI add this during my build and as a user logs in they get however many commands I have defined to run.R
RogueSpear Posted November 3, 2004 Posted November 3, 2004 Actually there is a Run, RunOnce, RunServices, and RunSericesOnce for HKCU.HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceYou can apply a Run or a RunOnce to the HKEY_USERS\.DEFAULT
rdalling Posted November 3, 2004 Posted November 3, 2004 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)
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now