none
安装Win7时,无人值守自动应答文件unattend.xml执行失败 RRS feed

  • 问题

  • 我们使用第3方公司的软件部署了一套装机系统,批量安装操作系统。

    但是在安装Win7时,偶而会出现以下无人值守自动应答文件执行失败的问题(见下图),无规律。请各位DX分析一下

    大概流程:

    1. 装机系统首先格式化硬盘,安装Win7(类似ghost)以及下载好驱动后,装机脚本会把unattend.xml文件拷贝到C盘根目录,然后机器重启
    2. 重启后Windows应该是自动搜索到该unattend.xml文件,然后copy c:\ Windows\Panther 下进行处理。
    3. 当报错后(见下图),发现c:\ Windows\Panther\unattend.xml 文件不完整,只有前面一部分内容。而且每次出错后,该文件的残缺内容并不固定,有时多些有时少些。

    附:c:\ Windows\Panther\UnattendGC\ setupact.log 中相关”unattend”关键字的日志

    2011-09-01 10:12:02, Info                         [windeploy.exe] Found no unattend file.
    2011-09-01 10:12:11, Info                         [oobeldr.exe] Status for unattend pass [oobeSystem] = 0x0
    2011-09-01 10:12:12, Info                         [oobeldr.exe] Found no unattend file for oobeSystem pass; skipping pass.
    2011-09-01 10:12:12, Info                         [oobeldr.exe] No reboot has been requested for oobeSystem unattend.
    2011-11-25 17:53:01, Info                         [windeploy.exe] Found no unattend file.
    2011-11-25 17:53:03, Info                         [audit.exe] Status for unattend pass [auditSystem] = 0x0
    2011-11-25 17:53:03, Info                         [audit.exe] Found no unattend file for auditSystem pass; skipping pass.
    2011-11-25 17:53:03, Info                         [audit.exe] No reboot has been requested for auditSystem unattend.
    2011-11-25 17:53:03, Info                         [audit.exe] Successfully ran unattend pass.
    2011-11-25 17:54:51, Info                         [audit.exe] Status for unattend pass [auditUser] = 0x0
    2011-11-25 17:54:52, Info                         [audit.exe] Found no unattend file for auditUser pass; skipping pass.
    2011-11-25 17:54:52, Info                         [audit.exe] No reboot has been requested for auditUser unattend.
    2011-11-25 17:54:52, Info                         [audit.exe] Successfully ran unattend pass.
    2012-01-06 22:37:22, Info                         [windeploy.exe] UnattendSearchExplicitPath: Found unattend file at [C:\unattend.xml]; examining for applicability.
    2012-01-06 22:37:22, Info                         [windeploy.exe] UnattendSearchExplicitPath: Found usable unattend file for pass [auditSystem] at [C:\unattend.xml].
    2012-01-06 22:37:22, Info                         [windeploy.exe] Found unattend file: [C:\unattend.xml]
    2012-01-06 22:37:22, Info                         [windeploy.exe] This is supposed to be an audit boot; checking for <Reseal> setting override in unattend file [C:\unattend.xml]...
    2012-01-06 22:37:23, Info                         [audit.exe] Status for unattend pass [auditSystem] = 0x0
    2012-01-06 22:37:23, Info                         [audit.exe] UnattendSearchExplicitPath: Found unattend file at [C:\unattend.xml]; examining for applicability.
    2012-01-06 22:37:23, Info                         [audit.exe] UnattendSearchExplicitPath: Found usable unattend file for pass [auditSystem] at [C:\unattend.xml].
    2012-01-06 22:37:23, Info                         [audit.exe] Running auditSystem pass with discovered unattend file [C:\unattend.xml]...
    2012-01-06 22:37:23, Info                         [audit.exe] Caching copy of unattend file: [C:\unattend.xml] -- cached at --> [C:\Windows\panther\unattend.xml]
    2012-01-06 22:37:23, Info                         [audit.exe] Cached unattend file, returned: [%windir%\panther\unattend.xml]
    2012-01-06 22:37:25, Info                         [audit.exe] Calling into RunSMIActionPass to execute unattend GCs for pass [auditSystem]
    2012-01-06 22:37:25, Info                         [audit.exe] [Action Queue] : Command Line = C:\WINDOWS\SYSTEM32\RUNDLL32.EXE / arguments = shsetup.dll,SHUnattendedSetup / pass = auditSystem / manifest path = C:\Windows\Winsxs\Manifests\x86_microsoft-windows-shell-setup_31bf3856ad364e35_6.1.7601.17514_none_d4623c9747e247a7.manifest
    2012-01-06 22:37:25, Info                         [audit.exe] [Action Queue] : Command Line = C:\WINDOWS\SYSTEM32\PNPUNATTEND.EXE / arguments =  / pass = auditSystem / manifest path = C:\Windows\Winsxs\Manifests\x86_microsoft-windows-p..tomizationsnonwinpe_31bf3856ad364e35_6.1.7601.17514_none_cdd6534eed78daef.manifest
    2012-01-06 22:37:25, Info                         [audit.exe] [Action Queue] : Executing command "C:\WINDOWS\SYSTEM32\RUNDLL32.EXE" shsetup.dll,SHUnattendedSetup auditSystem
    2012-01-06 22:37:26, Info                         [Shell Unattend] Running 'auditSystem' pass
    2012-01-06 22:37:26, Info                         [Shell Unattend] UserAccounts: Password set for 'Administrator' 
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon Password saved
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon Domain is ''
    2012-01-06 22:37:26, Info                         [Shell Unattend] WinLogon DefaultDomainName set to ''
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon Username is 'Administrator'
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon: enabled local account 'Administrator' 
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon: Using SID for 'Administrator'
    2012-01-06 22:37:26, Info                         [Shell Unattend] WinLogon DefaultUserName set to 'S-1-5-21-2064113618-594907047-2278209031-500'
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon LogonCount = 1
    2012-01-06 22:37:26, Info                         [Shell Unattend] WinLogon AutoLogonCount set
    2012-01-06 22:37:26, Info                         [Shell Unattend] AutoLogon enabled
    2012-01-06 22:37:26, Info                         [Shell Unattend] Exiting 'auditSystem' pass with status 0x00000000
    2012-01-06 22:37:26, Info                         [audit.exe] [Action Queue] : Unattend action returned operation complete.
    2012-01-06 22:37:26, Info                         [audit.exe] [Action Queue] : Executing command "C:\WINDOWS\SYSTEM32\PNPUNATTEND.EXE"  auditSystem
    2012-01-06 22:38:33, Info                         [PNPUNATTEND.EXE] AuditSystem
    2012-01-06 22:41:31, Error                        [PNPUNATTEND.EXE] 鏃犳硶瀹夎鈥渃:\windows\LDDriverStore\DP_Modem_XP_x86-32_1101\D\3\M\C\16\del000f5.inf鈥濄€?(閿欒浠g爜 0x103: 娌℃湁鍙敤鐨勬暟鎹簡銆?
    2012-01-06 22:41:31, Error                        [PNPUNATTEND.EXE] 鏃犳硶瀹夎椹卞姩绋嬪簭鍖呪€渃:\windows\LDDriverStore\DP_Modem_XP_x86-32_1101\D\3\M\C\16\del000f5.inf鈥濄€?(閿欒浠g爜 0x103: 娌℃湁鍙敤鐨勬暟鎹簡銆?
    2012-01-06 22:41:42, Info                         [audit.exe] [Action Queue] : Unattend action requested delayed reboot.
    2012-01-06 22:41:42, Info                         [audit.exe] One or more unattend GCs requested a delayed reboot; we will reboot the computer
    2012-01-06 22:41:43, Info                         [audit.exe] A reboot has been requested for auditSystem unattend.
    2012-01-06 22:41:43, Info                         [audit.exe] Successfully ran unattend pass.
    2012-01-06 22:43:01, Info                         [audit.exe] Status for unattend pass [auditSystem] = 0x9
    2012-01-06 22:43:01, Info                         [audit.exe] In-use cached unattend file for [auditSystem] is still present at [C:\Windows\panther\unattend.xml].
    2012-01-06 22:43:01, Info                         [audit.exe] No reboot has been requested for auditSystem unattend.
    2012-01-06 22:43:01, Info                         [audit.exe] Successfully ran unattend pass.
    2012-01-06 22:44:28, Info                         [audit.exe] Status for unattend pass [auditUser] = 0x0
    2012-01-06 22:44:28, Info                         [audit.exe] UnattendSearchExplicitPath: Found unattend file at [C:\Windows\Panther\unattend.xml]; examining for applicability.
    2012-01-06 22:44:28, Info                         [audit.exe] UnattendSearchExplicitPath: Found usable unattend file for pass [auditUser] at [C:\Windows\Panther\unattend.xml].
    2012-01-06 22:44:28, Info                         [audit.exe] UnattendSearchExplicitPath: Found unattend file at [C:\unattend.xml]; examining for applicability.
    2012-01-06 22:44:28, Info                         [audit.exe] UnattendSearchExplicitPath: Found usable unattend file for pass [auditUser] at [C:\unattend.xml].
    2012-01-06 22:44:28, Info                         [audit.exe] Running auditUser pass with discovered unattend file [C:\Windows\Panther\unattend.xml]...
    2012-01-06 22:44:28, Info                         [audit.exe] Caching copy of unattend file: [C:\Windows\Panther\unattend.xml] -- cached at --> [C:\Windows\panther\unattend.xml]
    2012-01-06 22:44:28, Info                         [audit.exe] Cached unattend file, returned: [%windir%\panther\unattend.xml]
    2012-01-06 22:44:29, Info                         [audit.exe] Calling into RunSMIActionPass to execute unattend GCs for pass [auditUser]
    2012-01-06 22:44:30, Info                         [SETUPUGC.EXE] SetupUGC running to process unattend settings for pass [auditUser]
    2012-01-06 22:45:57, Info                         [audit.exe] [Action Queue] : Unattend action returned operation complete.

    2012年5月18日 7:22

答案

全部回复

  • 补充  unattend.xml 文件内容

    <?xml version="1.0" encoding="utf-8"?>
    <unattend>
      <settings pass="auditSystem">
        <component name="Microsoft-Windows-PnpCustomizationsNonWinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <DriverPaths>
            <PathAndCredentials wcm:keyValue="1" wcm:action="add">
              <Path>c:\windows\LDDriverStore</Path>
            </PathAndCredentials>
          </DriverPaths>
        </component>
        <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
          <UserAccounts>
            <AdministratorPassword>
              <PlainText>true</PlainText>
              <Value></Value>
            </AdministratorPassword>
          </UserAccounts>
          <AutoLogon>
            <Enabled>true</Enabled>
            <Username>Administrator</Username>
            <Password>
              <PlainText>true</PlainText>
              <Value></Value>
            </Password>
            <LogonCount>1</LogonCount>
          </AutoLogon>
        </component>
      </settings>
      <settings pass="auditUser">
        <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <RunSynchronous>
            <RunSynchronousCommand wcm:action="add">
              <Order>1</Order>
              <Path>c:\windows\System32\sysprep\sysprep.exe /oobe /generalize /reboot </Path>
            </RunSynchronousCommand>
          </RunSynchronous>
        </component>
      </settings>
      <settings pass="generalize">
        <component name="Microsoft-Windows-PnpSysprep" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
          <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
        </component>
      </settings>
      <settings pass="oobeSystem">
        <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
          <OOBE>
            <HideEULAPage>true</HideEULAPage>
            <ProtectYourPC>1</ProtectYourPC>
            <SkipMachineOOBE>true</SkipMachineOOBE>
            <SkipUserOOBE>true</SkipUserOOBE>
          </OOBE>
          <ProductKey></ProductKey>
          <RegisteredOwner>Huawei</RegisteredOwner>
          <RegisteredOrganization>Huawei</RegisteredOrganization>
          <TimeZone>(UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi</TimeZone>
          <UserAccounts>
            <AdministratorPassword>
              <PlainText>true</PlainText>
              <Value></Value>
            </AdministratorPassword>
          </UserAccounts>
          <AutoLogon>
            <Enabled>true</Enabled>
            <Username>Administrator</Username>
            <Password>
              <PlainText>true</PlainText>
              <Value></Value>
            </Password>
            <LogonCount>1</LogonCount>
          </AutoLogon>
          <FirstLogonCommands>
            <SynchronousCommand>
              <CommandLine>cscript.exe c:\activewin7.js</CommandLine>
              <Description></Description>
              <Order>1</Order>
            </SynchronousCommand>
          </FirstLogonCommands>
        </component>
      </settings>
      <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
          <ComputerName>TEST-0000001</ComputerName>
        </component>
        <component name="Microsoft-Windows-UnattendedJoin" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
          <Identification>
            <Credentials>
              <Domain></Domain>
              <Username></Username>
              <Password></Password>
            </Credentials>
            <JoinWorkgroup>WORKGROUP</JoinWorkgroup>
          </Identification>
        </component>
      </settings>
    </unattend>

    2012年5月18日 9:20
  • 你好,

    建议从 Windows Deployment Toolkit 测试该 unattend.xml文件并部署 Windows 7

    Windows Deployment Toolkit

    http://technet.microsoft.com/zh-cn/library/ee376932.aspx

    无人参与文件示例

    http://technet.microsoft.com/zh-cn/library/cc732280(v=ws.10).aspx#Image1


    Ivan-Liu

    TechNet Community Support

    2012年5月21日 8:33
  • 好的,谢谢! 我尝试使用Windows Deployment Toolkit 测试该 unattend文件。

    但是我们部署Win7时不是每次都出这样的错误。95%以上的部署是正常的。只有5%左右的几率会碰到以上问题。

    2012年5月22日 10:14