Microsoft KB Archive/265016

= How to Run a Domain Logon Script in the Foreground with the Start.exe Command-Line Tool =

Article ID: 265016

Article Last Modified on 3/1/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition
 * Microsoft Windows 2000 Datacenter Server
 * Microsoft BackOffice Server 4.0

-



This article was previously published under Q265016





SUMMARY
By default, logon scripts run in the background. You can use the Start.exe command-line tool to run local and domain logon scripts on computers that are running Windows.



MORE INFORMATION
To create a domain logon script that runs in the foreground by using Start.exe, create a file named Logon.bat that contains the commands that you want to run. Then, create a file named Newfile.bat to call the Logon.bat file. Place both files in the Netlogon share on the domain controllers. In a Windows-based domain, start the Active Directory Users and Computers tool in Microsoft Management Console (MMC) and configure the user to use the Newfile.bat file as the logon script.

NOTE: In a Microsoft Windows NT 4.0-based domain, start the User Manager for Domains tool and configure the users to use the Newfile.bat file as the logon script.

Include the following line in the Newfile.bat file:

start /max logon.bat

When a user logs on, the logon script runs in the foreground.

NOTE: The file names Logon.bat and Newfile.bat are used in this article for illustration purposes only. You can use other file names.

Preferred Method for Windows-Based Clients
The preferred method for Windows-based clients is to use Group Policy to control the user's environment for logon scripts. The following Group Policy setting are available for logon scripts:  User Configuration\Administrative Templates\System\Logon\Logonff  Disable logoff Run logon scripts synchronously Run legacy logon scripts hidden Run logon scripts visible Run logoff scripts visible</li></ul>

</li> Computer Configuration\Adminstrative Templates\System\Logon <ul> Run logon scripts synchronously</li> Run legacy logon scripts hidden</li> Run startup scripts visible</li> Run shutdown scripts visible</li> Maximum wait time for Group Policy scripts</li></ul> </li></ul>

For more information about the Start tool, type start /? at a command prompt.

For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

126410 How to Start a Program From a Command Prompt in Windows

Additional query words: maximize

Keywords: kbenv kbhowto kbnetwork KB265016

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.