Share via


Assign a logon script to a local user account

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012

Administrators is the minimum group membership required to complete this procedure. Review the details in "Additional considerations" in this topic.

To assign a logon script to a local user account

  1. Open Computer Management.

  2. In the console tree, click Users .

    Where?

    • Computer Management\System Tools\Local Users and Groups\Users
  3. Right-click the user account that you want, and then click Properties .

  4. On the Profile tab, in Logon script , type the file name and relative path of the script.

Additional considerations

  • To perform this procedure, you must provide credentials for the Administrator account on the local computer (if you are prompted), or you must be a member of the Administrators group on the local computer.

  • Logon scripts can contain malicious commands. It is recommended that you be familiar with the contents of a logon script before you assign it to a user.

  • Logon scripts that are stored on a local computer apply only to users who log on to that local computer.

  • Local logon scripts must be stored in a shared folder — or subfolders of the shared folder — named Netlogon. If this folder does not exist by default, you must create it. To specify a logon script that is stored in a subfolder of the Netlogon folder, precede the file name with the relative path to that folder. For example, to assign the Startup.bat logon script that is stored in \\ ComputerName \Netlogon\ FolderName to a local user, in Logon script type FolderName \Startup.bat

Additional references

Assign a home folder to a local user account

Add a member to a local group