Sign in to follow this  
Followers 0
eaglekaiser

Executing file for each new XP user

3 posts in this topic

On an XP Pro Workstation I need to execute an AutoIt executable for each new user who logs on to the system for the first time to set some configuration parameters for certain applications.

After that, the file can be deleted while he is not needed anymore.

The AutoIt executable will be runned as Admin but that' s no problem while it is been done with the RunAsSet procedures.

Can anyone help me with this topic ? Thanks a lot

Share this post


Link to post
Share on other sites



Can anyone help me with this topic ? Thanks a lot

compile your script and add a "link" to it in HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. It will then be executed whenever a user logs on (runs after a user logs on, after the logon script finishes, but before the desktop is fully loaded in). Now, check if the user has logged on before. The easiest way would be to create your own registry key for that, e.g. HKLM\Software\eaglekaiser-soft\Users. Create a new key for each user that logs on. First check that value. If it's not found, the user logged on the first time. Do whatever you want to do and finally write the "marker" for that user.

RegWrite("HKLM\Software\eaglekaiser-soft\Users", @UserName, REG_DWORD, 1)

Cheers

Kurt


__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You can also put the EXE file in the "C:\Documents and Settings\Default User\Start Menu\Startup" area or the "HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run" key.

The "Default User" profile and the "HKEY_USERS\.DEFAULT" key are copied for new users. Be sure to cleanup the Startup folder and/or the "HKEY_CURRENT_USER\..." key after running.

/dev/null's way lets you track it though by checking the "HKLM\Software\eaglekaiser-soft\Users" key.

Just more alternatives.

Edited by c0deWorm

My UDFs: ExitCodes

Share this post


Link to post
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
Sign in to follow this  
Followers 0