Onde posso encontrar o último esquema unattended.xml (xsd)?

6

Estou trabalhando com o Windows Server 2012, o WDS (Serviço de Implantação do Windows) e o ADK (Kit de Avaliação e Implantação do Windows). Eu criei um arquivo base unattended.xml. Quando eu vou editar em um editor xml é realmente um pouco chato já que eu não tenho um xsd.

Basicamente, eu queria saber se existe um esquema (xsd) para o arquivo unattended.xml. Eu sei que posso acessar facilmente o site Microsoft TechNet: Instalação autônoma do Windows , mas encontro dois questões com isto:

  1. Não consigo encontrar os atributos disponíveis para cada nó.

    Por exemplo ... Eu sei que o Microsoft-Windows-Setup permite atributos como publicKeyToken , language , versionScope e processorArchitecture apenas observando o arquivo padrão unattended.xml que tenho; mas, na página, não vejo esses atributos listados ... apenas um resumo e quais nós podem ser colocados dentro desse nó.

  2. Não aumenta a velocidade nem facilita a edição do arquivo xml no meu editor xml.

Mais uma vez, apenas procurando onde posso encontrar o xsd, seja ele um download da Microsoft ou em um local de pasta específico, de um download da Microsoft ou até mesmo da conta de alguém, se ele tivesse sido feito à mão.

    
por m-y 10.01.2013 / 16:59

2 respostas

2

De acordo com essa pergunta do stackoverflow ( link ), você pode gerá-la

xsd.exe unattend.xml

Fiz uma pesquisa de palavras-chave para todos os arquivos xsd no MDT, depois da correspondência de arquivo publicKeyToken , language e processorArchitecture (mas não versionScope )

C:\Program Files\Microsoft Deployment Toolkit\Templates\Packages.xsd

Parece que estou correndo para um beco sem saída, mesmo a partir da documentação da MS. http://schemas.microsoft.com/unattend fornece a página de erro (contém outro esquema MS). Tentei usar o visualizador de recursos em algumas DLLs, mas não encontrei nenhum recurso xsd. Eu estou começando a suspeitar que o esquema autônomo é armazenado como algum tipo de estrutura de dados dentro de ferramentas MS.

Eu usei o xsd.exe contra Microsoft Deployment Toolkit\Templates\Unattend_Core_x64.xml e produzi o seguinte xsd. Talvez isso possa ajudar com o seu editor xml. (Isso não substitui um esquema oficial.)

Unattend_Core_x64.xsd

<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="unattend" targetNamespace="urn:schemas-microsoft-com:unattend" xmlns:mstns="urn:schemas-microsoft-com:unattend" xmlns="urn:schemas-microsoft-com:unattend" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" attributeFormDefault="qualified" elementFormDefault="qualified" xmlns:app1="http://schemas.microsoft.com/WMIConfig/2002/State">
  <xs:import namespace="http://schemas.microsoft.com/WMIConfig/2002/State" schemaLocation="Unattend_Core_x64_app1.xsd" />
  <xs:element name="unattend" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="settings">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="component" minOccurs="0" maxOccurs="unbounded">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="ComputerName" type="xs:string" minOccurs="0" msdata:Ordinal="1" />
                    <xs:element name="ProductKey" type="xs:string" minOccurs="0" msdata:Ordinal="2" />
                    <xs:element name="RegisteredOrganization" type="xs:string" minOccurs="0" msdata:Ordinal="3" />
                    <xs:element name="RegisteredOwner" type="xs:string" minOccurs="0" msdata:Ordinal="4" />
                    <xs:element name="DoNotCleanTaskBar" type="xs:string" minOccurs="0" msdata:Ordinal="5" />
                    <xs:element name="TimeZone" type="xs:string" minOccurs="0" msdata:Ordinal="6" />
                    <xs:element name="InputLocale" type="xs:string" minOccurs="0" msdata:Ordinal="7" />
                    <xs:element name="SystemLocale" type="xs:string" minOccurs="0" msdata:Ordinal="8" />
                    <xs:element name="UILanguage" type="xs:string" minOccurs="0" msdata:Ordinal="9" />
                    <xs:element name="UserLocale" type="xs:string" minOccurs="0" msdata:Ordinal="10" />
                    <xs:element name="UserAccounts" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="AdministratorPassword" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Value" type="xs:string" minOccurs="0" />
                                <xs:element name="PlainText" type="xs:string" minOccurs="0" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="AutoLogon" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="Enabled" type="xs:string" minOccurs="0" />
                          <xs:element name="Username" type="xs:string" minOccurs="0" />
                          <xs:element name="Domain" type="xs:string" minOccurs="0" />
                          <xs:element name="LogonCount" type="xs:string" minOccurs="0" />
                          <xs:element name="Password" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Value" type="xs:string" minOccurs="0" />
                                <xs:element name="PlainText" type="xs:string" minOccurs="0" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="RunSynchronous" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="RunSynchronousCommand" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Description" type="xs:string" minOccurs="0" msdata:Ordinal="0" />
                                <xs:element name="Order" type="xs:string" minOccurs="0" msdata:Ordinal="1" />
                                <xs:element name="Path" type="xs:string" minOccurs="0" msdata:Ordinal="2" />
                              </xs:sequence>
                              <xs:attribute ref="app1:action" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Identification" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="JoinDomain" type="xs:string" minOccurs="0" />
                          <xs:element name="JoinWorkgroup" type="xs:string" minOccurs="0" />
                          <xs:element name="MachineObjectOU" type="xs:string" minOccurs="0" />
                          <xs:element name="Credentials" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Username" type="xs:string" minOccurs="0" />
                                <xs:element name="Domain" type="xs:string" minOccurs="0" />
                                <xs:element name="Password" type="xs:string" minOccurs="0" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="SetupUILanguage" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="UILanguage" type="xs:string" minOccurs="0" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="ImageInstall" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="OSImage" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="WillShowUI" type="xs:string" minOccurs="0" />
                                <xs:element name="InstallTo" minOccurs="0" maxOccurs="unbounded">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="DiskID" type="xs:string" minOccurs="0" />
                                      <xs:element name="PartitionID" type="xs:string" minOccurs="0" />
                                    </xs:sequence>
                                  </xs:complexType>
                                </xs:element>
                                <xs:element name="InstallFrom" minOccurs="0" maxOccurs="unbounded">
                                  <xs:complexType>
                                    <xs:sequence>
                                      <xs:element name="Path" type="xs:string" minOccurs="0" />
                                      <xs:element name="MetaData" minOccurs="0" maxOccurs="unbounded">
                                        <xs:complexType>
                                          <xs:sequence>
                                            <xs:element name="Key" type="xs:string" minOccurs="0" />
                                            <xs:element name="Value" type="xs:string" minOccurs="0" />
                                          </xs:sequence>
                                        </xs:complexType>
                                      </xs:element>
                                    </xs:sequence>
                                  </xs:complexType>
                                </xs:element>
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Display" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="ColorDepth" type="xs:string" minOccurs="0" />
                          <xs:element name="HorizontalResolution" type="xs:string" minOccurs="0" />
                          <xs:element name="RefreshRate" type="xs:string" minOccurs="0" />
                          <xs:element name="VerticalResolution" type="xs:string" minOccurs="0" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="FirstLogonCommands" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="SynchronousCommand" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="CommandLine" type="xs:string" minOccurs="0" msdata:Ordinal="0" />
                                <xs:element name="Description" type="xs:string" minOccurs="0" msdata:Ordinal="1" />
                                <xs:element name="Order" type="xs:string" minOccurs="0" msdata:Ordinal="2" />
                              </xs:sequence>
                              <xs:attribute ref="app1:action" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="OOBE" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="HideEULAPage" type="xs:string" minOccurs="0" />
                          <xs:element name="NetworkLocation" type="xs:string" minOccurs="0" />
                          <xs:element name="ProtectYourPC" type="xs:string" minOccurs="0" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="ComplianceCheck" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="DisplayReport" type="xs:string" minOccurs="0" />
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="UserData" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="AcceptEula" type="xs:string" minOccurs="0" />
                          <xs:element name="ProductKey" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Key" type="xs:string" minOccurs="0" />
                              </xs:sequence>
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="DriverPaths" minOccurs="0" maxOccurs="unbounded">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="PathAndCredentials" minOccurs="0" maxOccurs="unbounded">
                            <xs:complexType>
                              <xs:sequence>
                                <xs:element name="Path" type="xs:string" minOccurs="0" msdata:Ordinal="0" />
                              </xs:sequence>
                              <xs:attribute ref="app1:keyValue" />
                              <xs:attribute ref="app1:action" />
                            </xs:complexType>
                          </xs:element>
                        </xs:sequence>
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                  <xs:attribute name="name" form="unqualified" type="xs:string" />
                  <xs:attribute name="processorArchitecture" form="unqualified" type="xs:string" />
                  <xs:attribute name="publicKeyToken" form="unqualified" type="xs:string" />
                  <xs:attribute name="language" form="unqualified" type="xs:string" />
                  <xs:attribute name="versionScope" form="unqualified" type="xs:string" />
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="pass" form="unqualified" type="xs:string" />
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
    
por 13.01.2013 / 09:10
0

Se você tiver o WAIK 8 instalado, vá para o diretório em que você o instalou. Localize o arquivo Microsoft.ComponentStudio.ComponentPlatformInterface.dll e abra-o no seu descompilador favorito para ver como a Microsoft faz isso.

O principal método a ser observado é o método Validate() e, quando você o examina, passa pelos diferentes estágios (passa) e os valida um a um. ValidateXml() é útil e vale a pena ser visto, assim como o DoLoad ()

Basicamente, é necessário obter alguns dos arquivos XSD instalados com o WAIK e usá-los:
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ Drivers.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ Groups.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ InstallerComponents.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ LinkedDeploymentShares.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ Medias.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ OperatingSystems.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ Packages.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ SelectionProfiles.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ TaskSequences.xsd"
"C: \ Arquivos de Programas \ Microsoft Deployment Toolkit \ Templates \ Applications.xsd"

    
por 10.06.2013 / 23:30