Export (0) Print
Expand All

Deploying Applications and .Sdb Files During Unattended Installations

Updated: March 28, 2003

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To deploy applications and .sdb files during an unattended installation, you need to configure the following items.

Your distribution share   Add your applications and .sdb files to your distribution share so that they can be installed on your destination computers.

Your Cmdlines.txt file   Add the appropriate commands to your Cmdlines.txt file so that Sdbinst.exe runs and installs your .sdb files after an operating system is installed on a destination computer, but before the destination computer restarts and a user logs on.

The [GuiRunOnce] section of your answer file   Add the appropriate commands to the [GuiRunOnce] section of your answer file so that your applications are installed on each of your destination computers after the computer restarts and a user logs on.

Your unattended installation must adhere to the following guidelines:

  • You cannot perform an unattended installation from a Windows XP Professional or Windows Server 2003 operating system CD. You must use a distribution share.

  • You cannot name your answer file Winnt.sif. You must name it Unattend.txt or another name. You can use the name Winnt.sif only if you are starting your destination computers from a Windows XP Professional or Windows Server 2003 operating system CD, which you cannot do if you are deploying applications or .sdb files.

  • You cannot install applications or .sdb files during an unattended upgrade. This is because you cannot use a distribution share during an unattended upgrade, and you need to use a distribution share to install applications and .sdb files.

Configuring Your Distribution Share

You need to add the following files to your distribution share to deploy applications and .sdb files during an unattended installation.

.Sdb files   Add your .sdb files to your distribution share so that the .sdb files are copied to every destination computer. Although you can save .sdb files in any folder on a destination computer, the most commonly used location is a folder named systemroot\AppPatch\Custom. To copy your .sdb files to the systemroot\AppPatch\Custom folder on each of your destination computers, save your .sdb files in the $OEM$\$$\AppPatch\Custom folder of your distribution share. To save your .sdb files to another folder on your destination computers, save your .sdb files in a corresponding folder in the $OEM$ folder of your distribution share. For example, if you want to save your .sdb files in systemdrive\Myapps\Sdbfiles, save your .sdb files in the $OEM$\$1\Myapps\Sdbfiles folder of your distribution share.

Installation files for applications   Add the installation files for your applications to your distribution share. This ensures that the installation files are copied to every destination computer, and that the files are available during your unattended installation. You can save installation files, such as .msi files, in any folder that you choose on a destination computer. For example, if you are installing an application called Myapp, you might save the installation files for Myapp in systemdrive\Apps\Myapp. To create this folder structure on every destination computer, add $OEM$\$1\Apps\Myapp to your distribution share.

For more information about structuring your distribution share, see "Designing Unattended Installations" in Automating and Customizing Installations of this kit.

Configuring Your Cmdlines.txt File

To install .sdb files during an unattended installation, you need to configure your Cmdlines.txt file. If you are not already using a Cmdlines.txt file to perform other installation and configuration tasks during an unattended installation, you need to create a Cmdlines.txt file.

To create a Cmdlines.txt file

  1. Use Notepad, or any text editor, to create a text file named Cmdlines.txt.

  2. Add the following section to the Cmdlines.txt file:

    [Commands]
    
  3. Save the Cmdlines.txt file in the $OEM$ folder of your distribution share.

  4. Add the following section, entry, and value to your unattended installation answer file:

    [Unattended]
    OemPreinstall = Yes
    

To configure a Cmdlines.txt file to install .sdb files

  • Add the Sdbinst.exe command, with the appropriate parameters, to the [Commands] section of your Cmdlines.txt file. The command and associated parameters must be enclosed in quotation marks.

Be sure to use the /c parameter with the Cmd.exe command. This terminates Cmd.exe when Sdbinst.exe has finished running. Also, be sure to use the -q parameter with the Sdbinst.exe command, which instructs Sdbinst.exe to run in quiet mode. For example, to install systemroot\AppPatch\Myapp.sdb, create the following entry in your Cmdlines.txt file, below the [Commands] section heading:

" cmd.exe /c sdbinst -q %systemroot%\AppPatch\Myapp.sdb"

Configuring the [GuiRunOnce] Section in Your Answer File

To install applications on a destination computer during an unattended installation, you need to add commands to the [GuiRunOnce] section in your answer file. The commands that you use depend on how you are installing the application. If you are installing an application that is packaged into an .msi file, use the Msiexec command to start the Windows Installer tool. If you are installing an application that is not packaged into an .msi file, use whatever command is necessary to run the application’s setup program (usually, the command is Setup).

For example, to install an application that is packaged into an .msi file, add the following command to the [GuiRunOnce] section of your answer file:

" cmd.exe /c msiexec /qn /i Myapp.msi"

The /c parameter instructs the command console program to close when Msiexec.exe stops running. The /i parameter instructs the Windows Installer program to install the .msi package, and the /qn parameter instructs the Windows Installer program to run without displaying a user interface.

Likewise, to install an application that is not packaged into an .msi file and that has its own setup program named Setup.exe, add the following command to the [GuiRunOnce] section of your answer file:

" cmd.exe /c Setup.exe"

Regardless of whether you install applications with the Windows Installer program or with an application’s setup program, you must adhere to the following guidelines in setting up an unattended installation.

Installation programs cannot require a restart   You can automate installation tasks only if you can prevent the installation program from restarting the computer. When a computer restarts, all remaining commands in the [GuiRunOnce] section are lost. If the system restarts before running the commands listed in the [GuiRunOnce] section, the remaining commands will not run. Therefore, you need to suppress restarts. If you cannot suppress a restart within the installation program, you can try to repackage the application into a Windows Installer package by using a third-party application. For more information about Windows Installer packaging, see the Windows Installer Software Developer’s Kit (SDK) link on the Web Resources page at http://www.microsoft.com/windows/reskits/webresources.

Installation programs cannot rely on the Windows Explorer shell   The Windows Explorer shell is not loaded when the operating system starts running commands, programs, scripts, or batch files that are listed in the [GuiRunOnce] section of an answer file. In some cases, the application vendor can give you an updated installer program that does not rely on the Windows Explorer shell. If the vendor cannot provide this, you might be able to repackage the application as a Windows Installer package (.msi file).

Installation programs might need to be run from a batch file   Installation programs often start and stop several different processes. In some cases when you are installing multiple applications, this can inadvertently cause the next command listed in the [GuiRunOnce] section to start before the previous command finishes running. When this occurs, the second installation program usually fails. To prevent this, you can run the installation programs from batch files by using the Start command with the /wait parameter. This forces each installation program to run until it is completed before the next command listed in [GuiRunOnce] runs. For more information about using the start command to run installation programs in batch files, in Help and Support Center for Windows Server 2003, click Tools, and then click Command-line reference A-Z.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft