Performing an automated installation

Examples See also History Extra
Performing an automated installation

This chapter contains the following information:
  • Principles of an automated installation
  • Automated installation using the record / play mode
  • Automated installation via the command line
  • Parameter list
  • Return values from the installation process


Principles of an automated installation

Introduction
Principles of an automated installation

Introduction

If you are responsible for managing the software packages on several computers, you have several options for automating the installation.

Record / Play Function

You can use the record / play function to automate the following installation processes:

  • Installation

    The software is installed on the basis of the parameters selected.

  • Modify or update

    The software is reinstalled on the basis of the parameters selected.

Command line

You can use the command line to automate the following installation processes:

  • Installation

    The software is installed on the basis of the parameters selected.

  • Modify or update

    The software is reinstalled on the basis of the parameters selected.

  • Repair (REINSTALL)

    When this option is selected, the existing software installation is repaired by means of a reinstallation. You can combine the "REINSTALL" parameter only with the "REBOOT", "/qn" and "/qb" parameters. Thus, the software is reinstalled with the same parameters used for the original installation.

  • Uninstall (REMOVE)

    The software is removed from the system. You can combine the "REMOVE" parameter only with the "REBOOT", "/qn" and "/qb" parameters.

Note

To execute the install, modify or update, repair or uninstall commands automatically, you must use one of the two parameters "/qn" or "/qb". If you omit these parameters, the normal installation dialog opens, allowing you to perform a manual installation.


Automated installation using the record / play mode

Automated installation using the record / play mode

This chapter contains the following information:
  • Start recording
  • Selecting installation settings
  • Playing the recording


Start recording

Requirements Procedure Result
Start recording

Requirements

  • Hardware and software of the programming device or PC meet the system requirements.

Procedure

To record the installation, proceed as follows:

  1. Open the Windows command prompt with "Start > Run > cmd".

  2. Switch to the directory that contains the "Start.exe" file.

  3. In the command prompt, enter the following command:

    • "Start.exe /record"

  4. Press the <Return> key to confirm your entry.

Result

The installation dialog opens with the information that you are in Record mode and the system will not be changed.


Selecting installation settings

Procedure Result
Selecting installation settings

Procedure

Proceed as follows to set the options for the installation:

  1. In the dialog for selecting the setup language, select the language in which you want the setup program dialogs to be displayed and click the "Next" button.

    The dialog for selecting the product languages opens.

  2. Select the languages for the product user interface, and click the "Next" button.

    Note

    "English" is always installed as the default product language.

    The dialog for selecting the product configuration opens.

  3. Select the products you want to install:

    • If you wish to install the program in a minimal configuration, click on the "Minimal" button.

    • If you wish to install the program in a typical configuration, click on the "Typical" button.

    • If you wish to manually select which products are to be installed, select/deselect the option boxes for the products you wish to install. This activates the "User defined" button automatically.

  4. If you want to create a shortcut on the desktop, select the "Create desktop shortcut" check box.

  5. Click the "Browse" button if you want to change the target directory for the installation.

    Note

    We recommend that you use the "Program Files" folder as the target directory. If you select a hard drive (e.g. "D:"), make sure that this drive is present on all computers on which the program is to be installed.

  6. Click the "Next" button.

    The dialog for the license terms opens.

  7. To continue the installation, read and accept all license agreements and click "Next".

    If changes to the security and permissions settings are required in order to install the TIA Portal, the security settings dialog opens.

  8. To continue the installation, accept the changes to the security and permissions settings, and click the "Next" button.

    The next dialog displays an overview of the installation settings.

  9. Check the selected installation settings. If you want to make any changes, click the "Back" button until you reach the point in the dialog where you want to make changes. Once you have completed the desired changes, return to the overview by clicking "Next".

  10. Click the "Next" button.

    The dialog with the procedure to follow for a restart and in the event of errors opens.

  11. Select the desired options and save the configuration.

  12. Click the "Exit" button.

Result

The automated installation file has been created and saved.


Playing the recording

Requirements Procedure Result
Playing the recording

Requirements

  • Hardware and software of the programming device or PC meet the system requirements.

  • You have administrator privileges on your computer.

  • The previously recorded file ("*.rec") is present.

  • All running programs are closed.

Procedure

To play the installation, proceed as follows:

  1. Open the Windows command prompt with "Start > Run > cmd".

  2. Switch to the directory that contains the "Start.exe" file.

  3. In the command prompt, enter the following command:

    • "Start.exe /play=<Drive>:\<Directory>\<File name>", e. g. "Start.exe /play=c:\siemens configuration\autoinstall.rec"

  4. Press the <Return> key to confirm your entry.

    Note

    If no license key is found during the installation, the license transfer is skipped and you can take care of this later with the Automation License Manager.

Result

Installation takes place automatically using the settings recorded in the configuration file.


Automated installation via the command line

Automated installation via the command line

This chapter contains the following information:
  • Automating the installation
  • Automating modify or update
  • Automating repair
  • Automating uninstall
  • Examples of automated installation via the command line


Automating the installation

Requirements Procedure
Automating the installation

Requirements

  • Hardware and software of the programming device or PC meet the system requirements.

  • You have administrator privileges on your computer.

  • All running programs are closed.

Procedure

To start the installation with the desired options directly via the command interface, proceed as follows:

  1. Open the Windows command prompt with "Start > Run > cmd".

  2. Switch to the directory that contains the "Start.exe" file.

  3. In the command prompt, enter one of the following commands:

    • Installation with visible progress bar: "Start.exe /qb <Parameter>"

    • Installation without visible progress bar: "Start.exe /qn <Parameter>" or "Start.exe /silent <Parameter>"

      Note

      When using the "REBOOT=Suppress" option, remember that you must evaluate the return value yourself and possibly restart the system.

  4. Press the <Return> key to confirm your entry.


Automating modify or update

Requirements Procedure
Automating modify or update

You have the option to automate modifying installed products or updating to a new version. For this purpose, you can start the reinstallation with the desired options directly as a command line.

Requirements

  • Hardware and software of the programming device or PC meet the system requirements.

  • You have administrator privileges on your computer.

  • All running programs are closed.

Procedure

To modify or update installed products directly via the command line, follow these steps:

  1. Open the Windows command prompt with "Start > Run > cmd".

  2. Switch to the directory that contains the "Start.exe" file.

  3. In the command prompt, enter one of the following commands:

    • Installation with visible progress bar: "Start.exe /qb <Parameter>"

    • Installation without visible progress bar: "Start.exe /qn <Parameter>" or "Start.exe /silent <Parameter>"

      Note

      When using the "REBOOT=Suppress" option, remember that you must evaluate the return value yourself and possibly restart the system.

  4. Press the <Return> key to confirm your entry.


Automating repair

Requirements Procedure
Automating repair

If you invoke "Start.exe" again with the parameter "REINSTALL=ALL" after having performed an installation, a reinstallation of all components take place exactly as if you had selected "Repair" during a dialog-guided installation. The installation is identical to that described previously. Automated repair via the command line is invoked in the exact same way as automated installation. You can determine the restart behavior by entering a parameter.

"REINSTALL" can be combined only with the "REBOOT", "/qn" and "/qb" parameters. All other parameters are prohibited.

Requirements

  • Hardware and software of the programming device or PC meet the system requirements.

  • You have administrator privileges on your computer.

  • All running programs are closed.

Procedure

To repair an installation directly via the command line, follow these steps:

  1. Open the Windows command prompt with "Start > Run > cmd".

  2. Switch to the directory that contains the "Start.exe" file.

  3. In the command prompt, enter one of the following commands:

    • Installation with visible progress bar: "Start.exe /qb REINSTALL=ALL <REBOOT-Parameter>"

    • Installation without visible progress bar: "Start.exe /qn REINSTALL=ALL <REBOOT-Parameter>" or "Start.exe /silent REINSTALL=ALL <REBOOT-Parameter>"

      Note

      The REBOOT parameter is optional. When using the "REBOOT=Suppress" option, however, remember that you must evaluate the return value yourself and possibly restart the system.

  4. Press the <Return> key to confirm your entry.


Automating uninstall

Requirements Procedure
Automating uninstall

If you want to remove an existing installation, you can accomplish this by means of an automated uninstall. This uninstalls all software packages. Automated uninstall via the command line is invoked in the exact same way as automated installation. You can determine the restart behavior by entering a parameter.

"REMOVE" can be combined only with the "REBOOT", "/qn" and "/qb" parameters. All other parameters are prohibited.

Requirements

  • You have administrator privileges on your computer.

  • All running programs are closed.

Procedure

To start the uninstall directly via the command line, follow these steps:

  1. Open the Windows command prompt with "Start > Run > cmd".

  2. Switch to the directory that contains the "Start.exe" file.

  3. In the command prompt, enter one of the following commands:

    • Uninstall with visible progress bar: "Start.exe /qb REMOVE =ALL <REBOOT-Parameter>"

    • Uninstall without visible progress bar: "Start.exe /qn REMOVE =ALL <REBOOT-Parameter>" or "Start.exe /silent REMOVE =ALL <REBOOT-Parameter>"

      Note

      The REBOOT parameter is optional. When using the "REBOOT=Suppress" option, however, remember that you must evaluate the return value yourself and possibly restart the system.

  4. Press the <Return> key to confirm your entry.


Examples of automated installation via the command line

Example of a typical installation with REBOOT=AUTO Example of a complete installation with REBOOT=Suppress Example of querying the return value per batch file
Examples of automated installation via the command line

Example of a typical installation with REBOOT=AUTO

The following example shows a typical installation via the command line:

Start.exe /qb REBOOT=Auto INSTALLLANGUAGE=1031;1033 INSTALLDIR="C:\Program Files\Siemens\Automation" INSTALLLEVEL=Typical

In this example, a typical installation ("INSTALLLEVEL=Typical") is performed for the languages German and English ("INSTALLLANGUAGE=1031;1033"). At the end of the installation, the system is restarted automatically without the request for a confirmation ("REBOOT=Auto"). The directory "C:\Program Files\Siemens\Automation" is used as the installation directory ("INSTALLDIR=C:\Program Files\Siemens\Automation").

Example of a complete installation with REBOOT=Suppress

The following example shows a complete installation via the command line:

Start.exe /qb REBOOT=Suppress INSTALLLANGUAGE=1031;1033 INSTALLDIR="C:\Program Files\Siemens\Automation" INSTALLLEVEL=Complete

In this example, a complete installation ("INSTALLLEVEL=Complete") is performed for the languages German and English ("INSTALLLANGUAGE=1031;1033"). At the end of the installation, restart of the system is suppressed ("REBOOT=Suppress"). This means that you must evaluate the return value yourself and possibly restart the system manually.

Example of querying the return value per batch file

The following example shows you how to query the return value per batch file:

SET SetupSuccess=%ERRORLEVEL%

if '%SetupSuccess%' EQU '0' (

echo Setup successful. Return code: %SetupSuccess%

) else (

if '%SetupSuccess%' EQU '3010' (

echo Setup successful. A reboot is needed! Return code: %SetupSuccess%

) else (

echo "ERROR during Setup! Return code: %SetupSuccess%

)

)

Pause

The return code "1641" also documents successful completion of the installation and that restart has already been initiated. Restart occurs, however, only if "/REBOOT=Auto" is used and for this reason was not evaluated in the batch file.

You can find all possible return values under Return values from the installation process.


Parameter list

Parameters for automated installation
Parameter list

Parameters for automated installation

The following table shows the parameters available to you for an automated installation:

Parameters

Description

Permitted for

Possible values

Explanation of the values

/qb

You can use this parameter to perform an automated installation. During the installation, you will receive information in the form of a progress bar on the installation currently being performed.

Notes:

  • Without the parameter "qb" or "qn", you cannot perform an automated installation.

  • The parameters "qn" and "qb" cannot both be used together within a command.

  • The information presented during the installation appears only in English. This means that this information matches the texts in the log files. You need these log files, for instance, if you need to contact Product Support.

Installation

Reinstallation

Uninstall

-

/qn or /silent

You can use this parameter to perform an automated installation. During the installation, you will receive no information on the installation currently being performed.

Note:

  • Without the parameter "qb" or "qn", you cannot perform an automated installation.

  • The parameters "qn" and "qb" cannot both be used together within a command.

Installation

Reinstallation

Uninstall

-

/lcid

You can use this parameter to specify the setup language you want to use for the installation. Here, you enter the following local ID (LCID) for the desired language in decimal format.

Example:

/lcid=1031

Installation

Reinstallation

Uninstall

1031

German

1033

English

1040

Italian

1036

French

3082

Spanish

2052

Chinese

...

Further product languages

/record

You can use this parameter to start the Record mode. It creates the "autoinstall.rec" file for automated installation

Installation

/play

You can use this parameter to start the Play mode. In this mode, you need the configuration file that was created in the Record mode.

Example:

/play="C:\Siemens Configurations\autoinstall.rec"

Installation

INSTALLDIR

You can use this parameter to specify the target direction for the installation.

Example:

INSTALLDIR="C:\Program Files\Siemens\Automation"

Installation

INSTALLLANGUAGE

INSTALLLANGUAGE

You can use this parameter to specify the product languages you want to install. Here, you enter the following local IDs (LCID) for the desired languages in decimal format.

Example:

INSTALLLANGUAGE=1031;1033

Installation

1031

German

1033

English

1040

Italian

1036

French

3082

Spanish

2052

Chinese

...

Further product languages

REBOOT

You can use this parameter to specify the restart characteristics during the installation.

Example:

REBOOT=Suppress

Installation

Reinstallation

Uninstall

Auto

A restart, if necessary, is performed automatically at the end of installation.

Suppress

The restart is suppressed at the end of installation. If a restart would have been necessary, the calling process must initiate the restart.

ONERROR

You can use this parameter to specify the procedure to follow in the event of an error at the end of installation.

Example:

ONERROR=Suppress

Installation

Reinstallation

Uninstall

Suppress

The dialog with the errors that occurred is suppressed at the end of installation. The errors can be evaluated on the basis of the return values during the process.

User

In the event of an error, the dialog with the errors that occurred is displayed at the end of installation.

INSTALLLEVEL

You can use this parameter to specify the type of installation.

Example:

INSTALLLEVEL=Complete

Installation

Minimum

Minimum installation

Typical

Typical installation

Complete

Complete installation


Return values from the installation process

List of return values
Return values from the installation process

List of return values

The following table shows the return values from an automated installation along with their descriptions:

Return value | Technical fault description | Description
? | OtherError | Any return value that is not described in the following table generally indicates an error. Detailed information on all errors can always be found in the installation log. Open the most recent log file whose name begins with "SIA".
0 | Success | The installation was successful. No errors have occurred.
5 | AccessDenied | You do not have appropriate rights. The installation requires administrator's rights.
112 | DiskFull | Not enough free space on the target media.
1601 | InstallServiceFailure | An internal error has occurred during initialization.
1602 | UserExit | Cancellation by user occurs most often as the result of Cancel being selected in a dialog.
1603 | InstallFailure | An error has occurred while performing the installation.
1605 | UnknownProduct | An internal error has occurred during product configuration.
1610 | BadConfiguration | An internal error has occurred during product configuration.
1618 | InstallAlreadyRunning | Another installation is already running. A simultaneous installation is not possible.
1622 | InstallLogFailure | An error has occurred while writing the log.
1627 | FunctionFailed | An internal error has occurred.
1633 | InstallPlatformUnsupported | This operating system is not supported.
1639 | InvalidCommandline | There is an error in the indicated command line.
1641 | SuccessRebootInitiated | The installation was successful. A restart has already been initiated to complete the operation.
3010 | SuccessRebootRequired | The installation was successful. A restart is absolutely necessary to complete the operation!
5001 | PrerequisitesFailure | The installation conditions have not been fulfilled. For more information, you can restart the installation by double-clicking start.exe.
5002 | InvalidIEVersion | Internet Explorer is not installed or an unsupported version is installed.
5003 | ResourcesFailed | An internal error has occurred during initialization.
5004 | ProductInitFailed | An internal error occurred (the installation media may be defective).
5005 | ProductInitNewerVersionInstalled | A newer version of the product is already installed.
5006 | ProductInitMoreValuableEditionInstalled | A more complete edition of the product is already installed (e.g. if you are attempting to install a basic version although a professional version is installed).
5007 | ProductInitOptionalWithoutMain | You are attempting to install an optional package without the main software.
5008 | ProductIncompatibility | A product that is incompatible with the product to be installed is already present.
5009 | AutoinstallFileNotFound | The file required for the Play mode could not be found.
5010 | AutoinstallUnexpectedContent | The file for the Play mode cannot be read (wrong format, wrong version or unsuitable installation media).
11641 | NotCompleteReboot | Setup is not complete and must be continued after restarting. Restarting has already begun. After restarting, you must restart installation.
13010 | NotCompleteRebootRequired | Setup is not complete and must be continued after restarting. You must initiate a restart and then restart the installation again.