Documente online.
Zona de administrare documente. Fisierele tale
Am uitat parola x Creaza cont nou
 HomeExploreaza
upload
Upload




Designing Automated Post-Installation Tasks

windows en


Designing Automated Post-Installation Tasks

Post-installation tasks include any installation and configuration tasks that need to be performed after the operating system is installed. Post-installation tasks are usually described in your component design or your client and server configuration design. You 22522m121w usually perform these tasks by running a command, program, script, or batch file after Setup is finished running. For example, your client networking design might include information about network settings that need to be configured with the Netset.exe command line tool. Likewise, your client configuration design might include information about mapped network drive settings that need to be configured with the net use command or printers that need to be installed with the Rundll32.exe program.



You can automate these types of tasks after the operating system is installed by using a Cmdlines.txt file or by using the [GuiRunOnce] section in your answer file. Both methods allow you to run commands, programs, scripts, and batch files.

To design automated post-installation tasks for an unattended installation, you must:

Identify the tasks you want to perform after the operating system is installed.

Design a method for automating the tasks you want to perform.

Identifying Automated Post-Installation Tasks

You can use an answer file to automate only a limited number of installation and configuration tasks during installation. Many installation and configuration tasks must be performed after the operating system is installed and configured. Testing your unattended installations is the best way to determine whether an installation or configuration task must be performed after the operating system is installed. However, the following installation and configuration tasks always must be performed after the operating system is installed:

Tasks that cannot be performed by setting an answer file entry. You cannot add any other sections or entries to an answer file that is used to perform an unattended installation. For a worksheet that contains a list of all possible answer file sections and entries, see "Answer File Settings Worksheet" (ACIUI_5.doc) on the Windows Server 2003 Deployment Kit companion CD (or see "Answer File Settings Worksheet" on the Web at https://www.microsoft.com/reskit).

Tasks that rely on Active Directory directory service. For example, if a software installation program registers information in Active Directory or requires information from Active Directory, you must run the installation program after the operating system is installed and the computer is joined to a domain.

Tasks that can be performed only while a user is logged on. For example, some software installation programs create shortcuts on the Start menu and the desktop. If you want these shortcuts applied to a specific user profile, then you need to run the installation program after the operating system is installed and the user is logged on.

You can automate post-installation tasks only if you can run the command, program, script, or batch file in quiet mode, or if you can suppress all user prompts by supplying an answer file for the command, program, script, or batch file. For example, if you delete folders after you install the operating system, you need to use the /q parameter with the rmdir command. Likewise, if you install Microsoft Word after you install the operating system, you need to create a Setup.ini file that provides configuration information to the Word Setup program.

Choosing a Method for Automating Post-Installation Tasks

You can perform automated post-installation tasks two ways: you can use a Cmdlines.txt file to run commands, programs, scripts, or batch files just after Setup finishes but before the computer restarts, or you can configure the [GuiRunOnce] section in an answer file to run commands, programs, scripts, and batch files after the computer restarts and a user logs on. Use the following guidelines to determine which method to use.

Using Cmdlines.txt

Use Cmdlines.txt when:

You are running commands, programs, scripts, or batch files from the $OEM$ folder on a distribution share.

You want to install applications or perform configuration tasks during GUI mode stage of Setup.

You want to install applications or perform configuration tasks under the Local System security account.

You do not need network connectivity to perform the installation or configuration task.

You are not using Windows Installer packages (.msi files) to install applications.

You want to install applications or perform configuration tasks while no user is logged on.

Using [GuiRunOnce]

Use [GuiRunOnce] when:

You need access to hard drives, CD-ROM drives, shared folders on the network, or other storage devices.

You want to install applications or perform configuration tasks under a specific user account.

You need network connectivity to perform an installation or configuration task.

You are using Windows Installer packages (.msi files) to install applications.

You need to control the order in which programs, scripts, or batch files run.

Important

You cannot use Cmdlines.txt if you are using an operating system CD and a Winnt.sif file to perform an unattended installation. You can use Cmdlines.txt only if you are installing from a distribution share.


For information about configuring Cmdlines.txt and [GuiRunOnce] to run programs, scripts, and batch files, see "Configuring Cmdlines.txt to Perform Tasks" and "Configuring [GuiRunOnce] to Perform Tasks" later in this chapter.

Configuring Cmdlines.txt to Perform Tasks

The Cmdlines.txt file contains a list of commands, programs, scripts, or batch files that are executed at the end of GUI mode stage Setup. You can configure Cmdlines.txt to run multiple commands, programs, scripts, or batch files. The commands, programs, scripts, and batch files run synchronously; for example, a command waits for the previous command to finish running before it starts. This means that you can control the order in which commands, programs, scripts, and batch files run. By default, Cmdlines.txt is not created, so you must manually create the file and save it in the $OEM$ folder in your distribution share.

The syntax for Cmdlines.txt is as follows:

[Commands]

"command_1"

"command_2"

.

.

"command_x"

Where command_1, command_2, and command_x refer to the commands, programs, scripts, or batch files that you want to run when GUI mode stage of Setup is complete. Note that all commands must be enclosed in quotation marks. Also, if you are using the command line (Cmd.exe) to run commands, programs, scripts, or batch files, then you need to use the /c parameter with the cmd command. For example, to create a new folder named Test on drive C, you type:

"cmd /c mkdir c:\Test"

To use Cmdlines.txt, you need to:

Add the following section, entry, and value to your answer file:

[Unattended]

OemPreinstall = Yes

Configure your Cmdlines.txt file, and save it in the $OEM$ folder in your distribution share.

Copy all of the programs, scripts, and batch files that are listed in your Cmdlines.txt file to the $OEM$ folder in your distribution share.

For a worksheet to assist you in recording the commands, programs, scripts, and batch files that you want to run by using Cmdlines.txt, see "Answer File Settings Worksheet" (ACIUI_5.doc) on the Windows Server 2003 Deployment Kit companion CD (or see "Answer File Settings Worksheet" on the Web at https://www.microsoft.com/reskit).

Configuring [GuiRunOnce] to Perform Tasks

The [GuiRunOnce] section of an answer file contains a list of commands, programs, scripts, or batch files that run the first time a user logs on to the computer after the operating system is installed. You can configure [GuiRunOnce] to run multiple commands, programs, scripts, or batch files. The commands, programs, scripts, and batch files run synchronously, which means each command, program, script, or batch file runs to completion before the next one starts running. This lets you control the order in which tasks are performed.

The syntax for [GuiRunOnce] is:

[GuiRunOnce]

"command_1"

"command_2"

.

.

"command_x"

Where command_1, command_2, and command_x refer to the commands, programs, scripts, or batch files that you want to run after the operating system is installed and a user logs on. Note that all commands must be enclosed in quotation marks.

To use [GuiRunOnce], you need to:

Add the [GuiRunOnce] section and the corresponding commands to your answer file.

Copy all of the programs, scripts, and batch files that are listed under [GuiRunOnce] to the $OEM$ folder in your distribution share.

For a worksheet to assist you in recording the commands, programs, scripts, and batch files that you want to run by using [GuiRunOnce], see "Answer File Settings Worksheet" (ACIUI_5.doc) on the Windows Server 2003 Deployment Kit companion CD (or see "Answer File Settings Worksheet" on the Web at https://www.microsoft.com/reskit).

If you use the [GuiRunOnce] section to install software, you need to adhere to the
following guidelines:

You cannot run installation programs that 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 entries in the [GuiRunOnce] section are lost. If the system restarts before completing entries listed in the [GuiRunOnce] section, the remaining items 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. For more information about Windows Installer packaging,
see the Windows Installer documentation link on the Web Resources page at https://www.microsoft.com/windows/reskits/webresources.

You cannot run installation programs that 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, you can get an updated installer program from the application vendor that does not rely on the Windows Explorer shell. If you cannot, you might be able to repackage the application as a Windows Installer package (.msi file).

You might need to run an installation program from a batch file so you can control the installation process with the /wait parameter

Installation programs often start and stop several different processes. In some cases, when you are installing multiple applications, this can inadvertently cause the next installation program listed in the [GuiRunOnce] section to start before the previous installation program is finished 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 to completion 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, under Support Tasks, click Tools, click "Command-line reference A-Z", and then click Start.


Document Info


Accesari: 1005
Apreciat: hand-up

Comenteaza documentul:

Nu esti inregistrat
Trebuie sa fii utilizator inregistrat pentru a putea comenta


Creaza cont nou

A fost util?

Daca documentul a fost util si crezi ca merita
sa adaugi un link catre el la tine in site


in pagina web a site-ului tau.




eCoduri.com - coduri postale, contabile, CAEN sau bancare

Politica de confidentialitate | Termenii si conditii de utilizare




Copyright © Contact (SCRIGROUP Int. 2024 )