Server Build DVD Exchange 2007 Tools Installation Command File Example

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

This topic provides sample command files that can be used as a starting point for creating the Microsoft Windows Server tools command file required to make a build DVD to improve the server build process. You can modify the following procedures to create the necessary command file for your organization.

The following sample script must be modified as described in the script remarks in order to make them functional in your specific environment. This script will help you automate many of the steps required to deploy an Exchange server in your environment.

Sample Command Files

Important

These scripts are samples to illustrate how automation steps can be implemented. You must modify them to make them appropriate for your environment. You must test everything in a lab environment prior to attempting to use them in your production environment.

Before You Begin

To perform the following procedures, the account you use must be a member of the Local Administrators group.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.

W2k3toolsinstall.cmd

Note

The following procedure only applies to deployments on Windows Server 2003 servers.

Procedure

Use Notepad to create a command file to automate the installation of Windows Server 2003 support tools in your Exchange environment

  1. Open Notepad or another text editor.

  2. Copy the following code into a file and save the file with a descriptive name and the .bat extension. We recommend naming the file W2k3toolsinstall.cmd.

    #"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    #"!!!!!!!  THIS IS NOT A MICROSOFT SUPPORTED SCRIPT.  !!!!!!!!"
    #"!!!!!!!      TEST IN A LAB FOR DESIRED OUTCOME      !!!!!!!!"
    #"!!!!!!!                          !!!!!!!!!!"
    #"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    #" "
    
    @echo off
    
    if "%1"=="" goto syntax
    if "%1"=="%1\" goto syntax
    
    set CDROMPATH=%1
    goto tools_directory
    
    :tools_directory
    echo.  Deleting Previous Versions of Support Tools (if installed)...
    if exist c:\tools (call rd c:\tools /q /s)
    if not exist c:\tools (call md c:\tools)
    if not exist c:\tools\Debugging (call md c:\tools\Debugging)
    goto debug_tools
    
    :debug_tools
    echo.  Installing Windows Debugging Tools...
    xcopy %cdrompath%\support\DebuggingTools C:\Tools\Debugging /i /e
    cscript.exe debuginstall.vbs
    regedit /s debug.reg
    goto end
    
    :syntax
    @echo SYNTAX: toolsinstall.cmd [CD-ROM Drive Letter]
    @echo CD EXAMPLE: w2k3toolsinstall.cmd R:
    @echo SHARE EXAMPLE: w2k3toolsinstall.cmd F:\E2K7ConfigCD
    
    :end
    @echo Finished installing Support Tools!
    pause
    

W2k8toolsinstall.cmd

Note

The following procedure only applies to deployments on Windows Server 2008 servers.

Procedure

Use Notepad to create a command file to automate the installation of Windows Server 2008 support tools in your Exchange environment

  1. Open Notepad or another text editor.

  2. Copy the following code into a file and save the file with a descriptive name and the .bat extension. We recommend naming the file W2k8toolsinstall.cmd.

    #"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    #"!!!!!!!  THIS IS NOT A MICROSOFT SUPPORTED SCRIPT.  !!!!!!!!"
    #"!!!!!!!      TEST IN A LAB FOR DESIRED OUTCOME      !!!!!!!!"
    #"!!!!!!!                          !!!!!!!!!!"
    #"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
    #" "
    @echo off
    
    if "%1"=="" goto syntax
    if "%1"=="%1\" goto syntax
    
    set CDROMPATH=%1
    goto tools_directory
    
    :tools_directory
    echo.  Deleting Previous Versions of Support Tools (if installed)...
    if exist c:\tools (call rd c:\tools /q /s)
    if not exist c:\tools (call md c:\tools)
    if not exist c:\tools\Debugging (call md c:\tools\Debugging)
    goto debug_tools
    
    :debug_tools
    echo.  Installing Windows Debugging Tools...
    xcopy %cdrompath%\support\DebuggingTools C:\Tools\Debugging /i /e
    cscript.exe debuginstall.vbs
    goto end
    
    :syntax
    @echo SYNTAX: toolsinstall.cmd [CD-ROM Drive Letter]
    @echo CD EXAMPLE: w2k8toolsinstall.cmd R:
    @echo SHARE EXAMPLE: w2k8toolsinstall.cmd F:\E2K7ConfigCD
    
    :end
    @echo Finished installing Support Tools!
    pause
    

For More Information

For more information about creating a configuration DVD or server installation automation files, see How to Create a Configuration DVD and Automation Files.