Como eu crio um unattend.xml simples para que a imagem não solicite um novo usuário?

1

Estou usando uma máquina virtual e o clonezilla para criar algumas imagens de teste para aprender um pouco sobre a implantação em diferentes configurações de máquinas.

Eu já consegui criar algumas imagens para o windows 8.1 e fazê-las funcionar do jeito que eu quero, sem a necessidade do sysprep, já que este sistema é muito maleável com hardware diferente.

O problema aparece quando quero criar uma imagem do Windows 7 e inevitavelmente preciso usar o sysprep com a opção "generalize" para aplicá-la a várias máquinas com hardware diferente, por padrão o Sysprep faz com que minha imagem solicite um novo usuário enquanto eu desejo ser capaz de usar o mesmo usuário.

Eu tentei usar o site "Gerador de arquivos de resposta do Windows" para gerar um xml que não fazia o usuário oobe e o oobe da máquina, mas acabou gerando muitos problemas na primeira inicialização impedindo que a imagem fosse usada e eu não sei se estou fazendo certo.

Alguém pode me ajudar? Obrigado pela sua atenção e desculpe pelo inglês não tão bom

Editar:

Aqui está o longo arquivo autounattend.xml que eu peguei com 'Windows Answer File Generator'

<?xml version="1.0" encoding="UTF-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
   <settings pass="windowsPE">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <SetupUILanguage>
            <UILanguage>pt-BR</UILanguage>
         </SetupUILanguage>
         <InputLocale>66582:00010416</InputLocale>
         <SystemLocale>pt-BR</SystemLocale>
         <UILanguage>pt-BR</UILanguage>
         <UserLocale>pt-BR</UserLocale>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <SetupUILanguage>
            <UILanguage>pt-BR</UILanguage>
         </SetupUILanguage>
         <InputLocale>66582:00010416</InputLocale>
         <SystemLocale>pt-BR</SystemLocale>
         <UILanguage>pt-BR</UILanguage>
         <UserLocale>pt-BR</UserLocale>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <Diagnostics>
            <OptIn>false</OptIn>
         </Diagnostics>
         <DiskConfiguration>
            <WillShowUI>OnError</WillShowUI>
            <Disk wcm:action="add">
               <DiskID>0</DiskID>
               <WillWipeDisk>false</WillWipeDisk>
               <CreatePartitions>
                  <CreatePartition wcm:action="add">
                     <Order>1</Order>
                     <Type>Primary</Type>
                     <Size>100</Size>
                  </CreatePartition>
                  <CreatePartition wcm:action="add">
                     <Order>2</Order>
                     <Type>Primary</Type>
                     <Extend>true</Extend>
                  </CreatePartition>
               </CreatePartitions>
               <ModifyPartitions>
                  <ModifyPartition wcm:action="add">
                     <Format>NTFS</Format>
                     <Label>System Reserved</Label>
                     <Order>1</Order>
                     <Active>true</Active>
                     <PartitionID>1</PartitionID>
                     <TypeID>0x27</TypeID>
                  </ModifyPartition>
                  <ModifyPartition wcm:action="add">
                     <Active>true</Active>
                     <Format>NTFS</Format>
                     <Label>OS</Label>
                     <Letter>C</Letter>
                     <Order>2</Order>
                     <PartitionID>2</PartitionID>
                  </ModifyPartition>
               </ModifyPartitions>
            </Disk>
         </DiskConfiguration>
         <ImageInstall>
            <OSImage>
               <InstallTo>
                  <DiskID>0</DiskID>
                  <PartitionID>2</PartitionID>
               </InstallTo>
               <WillShowUI>OnError</WillShowUI>
               <InstallToAvailablePartition>false</InstallToAvailablePartition>
            </OSImage>
         </ImageInstall>
         <UserData>
            <AcceptEula>false</AcceptEula>
            <FullName>User</FullName>
            <Organization />
         </UserData>
         <EnableFirewall>true</EnableFirewall>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <Diagnostics>
            <OptIn>false</OptIn>
         </Diagnostics>
         <DiskConfiguration>
            <WillShowUI>OnError</WillShowUI>
            <Disk wcm:action="add">
               <DiskID>0</DiskID>
               <WillWipeDisk>false</WillWipeDisk>
               <CreatePartitions>
                  <CreatePartition wcm:action="add">
                     <Order>1</Order>
                     <Type>Primary</Type>
                     <Size>100</Size>
                  </CreatePartition>
                  <CreatePartition wcm:action="add">
                     <Order>2</Order>
                     <Type>Primary</Type>
                     <Extend>true</Extend>
                  </CreatePartition>
               </CreatePartitions>
               <ModifyPartitions>
                  <ModifyPartition wcm:action="add">
                     <Format>NTFS</Format>
                     <Label>System Reserved</Label>
                     <Order>1</Order>
                     <Active>true</Active>
                     <PartitionID>1</PartitionID>
                     <TypeID>0x27</TypeID>
                  </ModifyPartition>
                  <ModifyPartition wcm:action="add">
                     <Active>true</Active>
                     <Format>NTFS</Format>
                     <Label>OS</Label>
                     <Letter>C</Letter>
                     <Order>2</Order>
                     <PartitionID>2</PartitionID>
                  </ModifyPartition>
               </ModifyPartitions>
            </Disk>
         </DiskConfiguration>
         <ImageInstall>
            <OSImage>
               <InstallTo>
                  <DiskID>0</DiskID>
                  <PartitionID>2</PartitionID>
               </InstallTo>
               <WillShowUI>OnError</WillShowUI>
               <InstallToAvailablePartition>false</InstallToAvailablePartition>
            </OSImage>
         </ImageInstall>
         <UserData>
            <AcceptEula>false</AcceptEula>
            <FullName>User</FullName>
            <Organization />
         </UserData>
         <EnableFirewall>true</EnableFirewall>
      </component>
   </settings>
   <settings pass="generalize">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <SkipRearm>1</SkipRearm>
      </component>
   </settings>
   <settings pass="generalize">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <SkipRearm>1</SkipRearm>
      </component>
   </settings>
   <settings pass="specialize">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <SkipAutoActivation>true</SkipAutoActivation>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <SkipAutoActivation>true</SkipAutoActivation>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <ComputerName>-PC</ComputerName>
         <ProductKey>----</ProductKey>
         <TimeZone>E. South America Standard Time</TimeZone>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <ComputerName>-PC</ComputerName>
         <ProductKey>----</ProductKey>
         <TimeZone>E. South America Standard Time</TimeZone>
      </component>
   </settings>
   <settings pass="oobeSystem">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <InputLocale>66582:00010416</InputLocale>
         <UILanguage>pt-BR</UILanguage>
         <UserLocale>pt-BR</UserLocale>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <InputLocale>66582:00010416</InputLocale>
         <UILanguage>pt-BR</UILanguage>
         <UserLocale>pt-BR</UserLocale>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <RegisteredOwner>User</RegisteredOwner>
         <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <NetworkLocation>Other</NetworkLocation>
            <ProtectYourPC>1</ProtectYourPC>
            <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
            <SkipMachineOOBE>true</SkipMachineOOBE>
            <SkipUserOOBE>true</SkipUserOOBE>
         </OOBE>
         <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
         <FirstLogonCommands>
            <SynchronousCommand wcm:action="add">
               <RequiresUserInput>false</RequiresUserInput>
               <Order>1</Order>
               <Description>Disable Auto Updates</Description>
               <CommandLine>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f</CommandLine>
            </SynchronousCommand>
            <SynchronousCommand wcm:action="add">
               <Description>Control Panel View</Description>
               <Order>2</Order>
               <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 0 /f</CommandLine>
               <RequiresUserInput>true</RequiresUserInput>
            </SynchronousCommand>
            <SynchronousCommand wcm:action="add">
               <Order>3</Order>
               <Description>Control Panel Icon Size</Description>
               <RequiresUserInput>false</RequiresUserInput>
               <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine>
            </SynchronousCommand>
         </FirstLogonCommands>
         <AutoLogon>
            <Password>
               <Value />
               <PlainText>true</PlainText>
            </Password>
            <Enabled>true</Enabled>
            <Username>User</Username>
         </AutoLogon>
         <UserAccounts>
            <LocalAccounts>
               <LocalAccount wcm:action="add">
                  <Password>
                     <Value />
                     <PlainText>true</PlainText>
                  </Password>
                  <Description />
                  <DisplayName>User</DisplayName>
                  <Group>Administrators</Group>
                  <Name>User</Name>
               </LocalAccount>
            </LocalAccounts>
         </UserAccounts>
      </component>
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <RegisteredOwner>User</RegisteredOwner>
         <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <NetworkLocation>Other</NetworkLocation>
            <ProtectYourPC>1</ProtectYourPC>
            <HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
            <SkipMachineOOBE>true</SkipMachineOOBE>
            <SkipUserOOBE>true</SkipUserOOBE>
         </OOBE>
         <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet>
         <FirstLogonCommands>
            <SynchronousCommand wcm:action="add">
               <RequiresUserInput>false</RequiresUserInput>
               <Order>1</Order>
               <Description>Disable Auto Updates</Description>
               <CommandLine>reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 3 /f</CommandLine>
            </SynchronousCommand>
            <SynchronousCommand wcm:action="add">
               <Description>Control Panel View</Description>
               <Order>2</Order>
               <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v StartupPage /t REG_DWORD /d 0 /f</CommandLine>
               <RequiresUserInput>true</RequiresUserInput>
            </SynchronousCommand>
            <SynchronousCommand wcm:action="add">
               <Order>3</Order>
               <Description>Control Panel Icon Size</Description>
               <RequiresUserInput>false</RequiresUserInput>
               <CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel" /v AllItemsIconView /t REG_DWORD /d 0 /f</CommandLine>
            </SynchronousCommand>
         </FirstLogonCommands>
         <AutoLogon>
            <Password>
               <Value />
               <PlainText>true</PlainText>
            </Password>
            <Enabled>true</Enabled>
            <Username>User</Username>
         </AutoLogon>
         <UserAccounts>
            <LocalAccounts>
               <LocalAccount wcm:action="add">
                  <Password>
                     <Value />
                     <PlainText>true</PlainText>
                  </Password>
                  <Description />
                  <DisplayName>User</DisplayName>
                  <Group>Administrators</Group>
                  <Name>User</Name>
               </LocalAccount>
            </LocalAccounts>
         </UserAccounts>
      </component>
   </settings>
   <settings pass="offlineServicing">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <EnableLUA>true</EnableLUA>
      </component>
   </settings>
   <settings pass="offlineServicing">
      <component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-LUA-Settings" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
         <EnableLUA>true</EnableLUA>
      </component>
   </settings>
</unattend>
    
por Gabriel L. P. Abreu 18.11.2016 / 20:31

0 respostas