CommandLineInstallation Schema

 

Applies To: Windows Server Update Services

Types

The CommandLineInstallation Schema defines the following types in the https://schemas.microsoft.com/msus/2002/12/UpdateHandlers/CommandLineInstallation target namespace. It references types from the BaseTypes Schema,the CSAPI Update Schema and the WindowsInstaller Schema.

InstallationCommand

Specifies the program and arguments to execute to install the update, and the possible return codes.

<complexType name="InstallationCommand">  
    <sequence>  
      <element name="ReturnCode" minOccurs="0" maxOccurs="unbounded">  
        <annotation>  
          <documentation>A possible return code from the program.</documentation>  
        </annotation>  
        <complexType>  
          <sequence>  
            <element name="LocalizedDescription" minOccurs="0" maxOccurs="unbounded">  
              <annotation>  
                <documentation>The localized description of this return code.  Update authors are encouraged but not required to include descriptions of their return codes. These descriptions are very useful when debugging failed installations.</documentation>  
              </annotation>  
              <complexType>  
                <sequence>  
                  <element name="Language" type="upd:LocalizedPropertiesLanguage" maxOccurs="unbounded">  
                    <annotation>  
                      <documentation>A language that this description applies to.  A description may apply to one or more languages.</documentation>  
                    </annotation>  
                  </element>  
                  <element name="Description" type="upd:Description">  
                    <annotation>  
                      <documentation>The actual description of this return code.</documentation>  
                    </annotation>  
                  </element>  
                </sequence>  
              </complexType>  
            </element>  
          </sequence>  
          <attribute name="Code" type="int" use="required">  
            <annotation>  
              <documentation>The return code.</documentation>  
            </annotation>  
          </attribute>  
          <attribute name="Result" type="upd:InstallationResult" use="required">  
            <annotation>  
              <documentation>The result of the installation when the program exits with this return code.</documentation>  
            </annotation>  
          </attribute>  
          <attribute name="Reboot" type="boolean" use="optional" default="false">  
            <annotation>  
              <documentation>Specifies whether or not a reboot should be performed when the program exits with this return code.</documentation>  
            </annotation>  
          </attribute>  
          <attribute name="DefaultLocalizedDescription" type="upd:LocalizedPropertiesLanguage" use="optional">  
            <annotation>  
              <documentation>The default language to use for displaying the localized description of this return code.  There must be a localized description the corresponds to this language.  When displaying localized descriptions, first check for one in your desired language.  If not available, use this default.  If this default is not specified, choose one using an algorithm that seems appropriate to you.</documentation>  
            </annotation>  
          </attribute>  
        </complexType>  
      </element>  
    </sequence>  
    <attribute name="Program" type="bt:FilePath" use="required">  
      <annotation>  
        <documentation>The program to execute.  The program must be a filename such as EXAMPLE.EXE, and may include an optional relative path.  The Client will download (and decompress) the files required for installation (if any) into a temporary directory, and then execute the program via Win32 CreateProcess.  This attribute specifies the file within the temporary directory to execute.  If the decompression results in subdirectories within the temporary directory, the file to execute may be within on of those subdirectories and the relative path should include that subdirectory.  Note that this means that only files within the temporary directory may be executed so the executable must be included in the files download from the server.</documentation>  
      </annotation>  
    </attribute>  
    <attribute name="Arguments" type="string" use="optional">  
      <annotation>  
        <documentation>The command-line arguments to pass to the program.  This attribute is passed as the lpCommandLine parameter to Win32 CreateProcess.</documentation>  
      </annotation>  
    </attribute>  
    <attribute name="DefaultResult" type="upd:InstallationResult" use="optional" default="Failed">  
      <annotation>  
        <documentation>The result to be used when the program exits with a return code other than those listed in this element.</documentation>  
      </annotation>  
    </attribute>  
    <attribute name="RebootByDefault" type="boolean" use="optional" default="false">  
      <annotation>  
        <documentation>Specifies whether or not a reboot should be performed when the program exits with a return code other than those listed in this element.</documentation>  
      </annotation>  
    </attribute>  
</complexType>  

CommandLineInstallation

Handler-specific data for updates that are Command-Line Installations.

<complexType name="CommandLineInstallation">  
    <complexContent>  
      <extension base="upd:HandlerSpecificData">  
        <sequence>  
          <element name="InstallCommand" type="tns:InstallationCommand" />  
          <element name="RepairPath"  
            type="msiuh:ExplicitWindowsInstallerRepairPath"  
            minOccurs="0"  
            maxOccurs="unbounded" />  
        </sequence>  
      </extension>  
    </complexContent>  
</complexType>