Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run a script at first logon only

Status
Not open for further replies.

zephyran

Technical User
Nov 30, 2001
311
US
We have a logon script we would like to run for each user ONLY the first time they log onto any computer in our domain. The script runs Outlook 2003 and invokes a .PRF file to automatically configure Outlook with their mailbox information. We do not use roaming profiles, so a new profile is created for each user when they log onto any one machine for the first time.

I have tried modifying the NTUSER.DAT file in the Default User profile on one machine to test, creating the

Software\Microsoft\Windows\CurrentVersion\RunOnce

registry key, and including within it the String value that contains the path to the script. However, this does not appear to work (either this RunOnce key is not imported into the new profile, or the script is run but does nothing and is subsequently deleted from the new profile).

Does anyone have experience with running "new profile only" scripts and knows the best way to make this work? I would prefer a solution that can be applied domain-wide, but anything would help.
 
Why not put it in your regular logon script and have the logon script look for a value in HKCU and if it doesn't find the value, perform the setup and then write a value into the HKCU user hive when the setup has completed. Next time though it will see the key and quickly bypass that section of code.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top