none
creating unattend for bootcamp - oobe firstlogon commands not running RRS feed

  • Question

  • I have been trying to get a bootcamp image creating for our Mac computers.  I am trying to use the strategy outlined in this article.
    http://www.bitprocessor.be/2009/12/29/windows-7-sysprep-tips-tricks/

    The issue is that I can't get the script to run (before the oobe pass) that will rename the computer.My workflow is that I boot into audit mode, run sysprep /quit /generalize /oobe /unattend:unattend.xml.   Then run this:

    reg add HKLM\System\Setup /v CmdLine /t REG_SZ /d "cmd /c cscript //nologo C:\windows\system32\sysprep\EditUnattend.vbs" /f

    Then I shutdown the machine.  When it's done it is at a login screen with the 2 local accounts and I get a user profile service error if I login with these accounts.  Also I am confused about when you need to use autologon.  Is is needed to run the fistlogoncommands during the oobe pass?

    Any help is appreciated!
      <?xml version="1.0" encoding="utf-8" ?> 
    - <unattend xmlns="urn:schemas-microsoft-com:unattend">
    - <settings pass="generalize">
    - <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SkipRearm>1</SkipRearm> 
      </component>
      </settings>
    - <settings pass="specialize">
    - <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <SkipAutoActivation>true</SkipAutoActivation> 
      </component>
    - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <CopyProfile>false</CopyProfile> 
      <ShowWindowsLive>false</ShowWindowsLive> 
      <TimeZone>Eastern Standard Time</TimeZone> 
    - <WindowsFeatures>
      <ShowInternetExplorer>true</ShowInternetExplorer> 
      <ShowWindowsMediaPlayer>false</ShowWindowsMediaPlayer> 
      <ShowWindowsMail>false</ShowWindowsMail> 
      <ShowMediaCenter>false</ShowMediaCenter> 
      </WindowsFeatures>
      <ProductKey>33PXH-7Y6KF-2VJC9-XBBR8-HVTHH</ProductKey> 
      <DoNotCleanTaskBar>true</DoNotCleanTaskBar> 
      <ComputerName>ReplaceMe1</ComputerName> 
      </component>
    - <component name="Security-Malware-Windows-Defender" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <DisableAntiSpyware>true</DisableAntiSpyware> 
      </component>
      </settings>
    - <settings pass="oobeSystem">
    - <component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <InputLocale>en-us</InputLocale> 
      <SystemLocale>en-us</SystemLocale> 
      <UILanguage>en-us</UILanguage> 
      <UserLocale>en-us</UserLocale> 
      </component>
    - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <ClientApplications>
      <Mail>http://exchange.musc.edu</Mail> 
      <Internet>www.musc.edu</Internet> 
      </ClientApplications>
    - <FirstLogonCommands>
    - <SynchronousCommand wcm:action="add">
      <Order>4</Order> 
      <CommandLine>c:\bootcamp\brigadier.cmd</CommandLine> 
      <RequiresUserInput>false</RequiresUserInput> 
      <Description>install appropriate bootcamp drivers</Description> 
      </SynchronousCommand>
    - <SynchronousCommand wcm:action="add">
      <CommandLine>c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe c:\bootcamp\joindom.ps1 >> %Public%\Documents\joindom.log</CommandLine> 
      <Description>join the domain</Description> 
      <Order>2</Order> 
      <RequiresUserInput>false</RequiresUserInput> 
      </SynchronousCommand>
    - <SynchronousCommand wcm:action="add">
      <CommandLine>c:\windows\System32\WindowsPowerShell\v1.0\PowerShell.exe -command set-executionpolicy remotesigned -force >> %Public%\Documents\setExecution.log</CommandLine> 
      <Order>1</Order> 
      <RequiresUserInput>false</RequiresUserInput> 
      <Description>set execution policy</Description> 
      </SynchronousCommand>
    - <SynchronousCommand wcm:action="add">
      <CommandLine>c:\windows\system32\WindowsPowerShell\v1.0\powershell.exe -command start-sleep -s 10 >> %Public%\Documents\sleep-10sec.log</CommandLine> 
      <Order>3</Order> 
      <Description>sleep 10</Description> 
      </SynchronousCommand>
      </FirstLogonCommands>
    - <OEMInformation>
      <Manufacturer /> 
      <SupportHours /> 
      <SupportPhone /> 
      <SupportURL /> 
      <HelpCustomized>false</HelpCustomized> 
      <Model /> 
      </OEMInformation>
    - <OOBE>
      <HideEULAPage>true</HideEULAPage> 
      <NetworkLocation>Work</NetworkLocation> 
      <ProtectYourPC>1</ProtectYourPC> 
      <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE> 
      </OOBE>
    - <VisualEffects>
      <FontSmoothing>ClearType</FontSmoothing> 
      </VisualEffects>
    - <WindowsFeatures>
      <ShowWindowsMail>false</ShowWindowsMail> 
      <ShowMediaCenter>false</ShowMediaCenter> 
      <ShowInternetExplorer>true</ShowInternetExplorer> 
      <ShowWindowsMediaPlayer>false</ShowWindowsMediaPlayer> 
      </WindowsFeatures>
      <RegisteredOrganization>Medical University of South Carolina</RegisteredOrganization> 
      <RegisteredOwner>MUSC User</RegisteredOwner> 
      <ShowWindowsLive>false</ShowWindowsLive> 
      <TimeZone>Eastern Standard Time</TimeZone> 
      <DisableAutoDaylightTimeSet>false</DisableAutoDaylightTimeSet> 
      <BluetoothTaskbarIconEnabled>false</BluetoothTaskbarIconEnabled> 
    - <AutoLogon>
    - <Password>
      <Value>bQB1AHMAYwAkADEAMgAzAFAAYQBzAHMAdwBvAHIAZAA=</Value> 
      <PlainText>false</PlainText> 
      </Password>
      <Username>administrator</Username> 
      <Enabled>true</Enabled> 
      <LogonCount>3</LogonCount> 
      </AutoLogon>
      </component>
      </settings>
      <cpi:offlineImage cpi:source="catalog://mycomputer/users/myuser/downloads/windows 7 lynx sysprep x64/windows 7 sal x64_windows 7 enterprise.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> 
      </unattend>



    Thursday, April 10, 2014 2:08 PM