+ Post New Thread
Results 1 to 5 of 5
Windows 7 Thread, sysprep answer file not running SynchronousCommand in Technical; Below I have added my answer file which I call when sysprepping a windows 7 machine. The sysprep runs and ...
  1. #1
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,550
    Thank Post
    518
    Thanked 56 Times in 50 Posts
    Rep Power
    30

    sysprep answer file not running SynchronousCommand

    Below I have added my answer file which I call when sysprepping a windows 7 machine. The sysprep runs and all is almost fine.
    The SynchronousCommands do not run.
    I call a batch file that sets the proxy server and then adds the windows key and then activates windows.
    This does not run automatically on first boot so i end up having to manually run the script.

    can anyone see any problems as to why this might be happening?

    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="generalize">
            <component name="Microsoft-Windows-Security-SPP" 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">
                <SkipRearm>1</SkipRearm>
            </component>
        </settings>
        <settings pass="specialize">
            <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>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
            <component name="Microsoft-Windows-Security-SPP-UX" 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">
                <SkipAutoActivation>true</SkipAutoActivation>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" 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">
                <CopyProfile>true</CopyProfile>
                <ShowWindowsLive>false</ShowWindowsLive>
                <TimeZone>GMT Standard Time</TimeZone>
                <ComputerName>*</ComputerName>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" 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">
                <InputLocale>en-GB</InputLocale>
                <SystemLocale>en-GB</SystemLocale>
                <UILanguage>en-GB</UILanguage>
                <UserLocale>en-GB</UserLocale>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" 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">
                <AutoLogon>
                    <Password>
                        <Value>YwBoADQAMgBNAGkAdABlAGwANgByAHIAUABhAHMAcwB3AG8AcgBkAA==</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <LogonCount>5</LogonCount>
                    <Username>administrator</Username>
                </AutoLogon>
                <FirstLogonCommands>
                    <SynchronousCommand wcm:action="add">
                        <CommandLine>C:\1st-boot-scripts\run-on-first-boot.bat</CommandLine>
                        <Order>1</Order>
                        <RequiresUserInput>false</RequiresUserInput>
                        <Description>Enter windows key and activate</Description>
                    </SynchronousCommand>
                    <SynchronousCommand wcm:action="add">
                        <Order>2</Order>
                        <CommandLine>rd /s /q c:\1st-boot-scripts</CommandLine>
                        <RequiresUserInput>false</RequiresUserInput>
                    </SynchronousCommand>
                </FirstLogonCommands>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <NetworkLocation>Home</NetworkLocation>
                    <ProtectYourPC>3</ProtectYourPC>
                </OOBE>
                <UserAccounts>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>YwBoADQAMgBNAGkAdABlAGwANgByAHIAUABhAHMAcwB3AG8AcgBkAA==</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local User</Description>
                            <DisplayName>reggie</DisplayName>
                            <Group>administrators</Group>
                            <Name>reggie</Name>
                        </LocalAccount>
                    </LocalAccounts>
                    <AdministratorPassword>
                        <Value>YwBoADQAMgBNAGkAdABlAGwANgByAHIAQQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                </UserAccounts>
                <RegisteredOrganization>Prenton High School for Girls</RegisteredOrganization>
                <RegisteredOwner>Prenton</RegisteredOwner>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="catalog:c:/win7/sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>
    Thanks

  2. #2

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    You could try moving the file to the C:\Windows\System32\Sysprep directory or you can specify the key and proxy settings in master images (as I do) and you can run Sysprep without the script.

  3. #3
    reggiep's Avatar
    Join Date
    Apr 2008
    Location
    In the vast area of space and time
    Posts
    1,550
    Thank Post
    518
    Thanked 56 Times in 50 Posts
    Rep Power
    30
    Quote Originally Posted by Michael View Post
    You could try moving the file to the C:\Windows\System32\Sysprep directory or you can specify the key and proxy settings in master images (as I do) and you can run Sysprep without the script.
    Hi Michael, could you explain how you specify the key and proxy in a master image? I thought those settings were lost on a sysprep?

  4. #4

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,262
    Thank Post
    242
    Thanked 1,572 Times in 1,252 Posts
    Rep Power
    340
    You just specify proxy settings and exceptions as you would normally. Sysprep won't remove these.

    As for your Windows key, you can specify a KMS or MAK in your answer file. Have a look here at my working answer file.

  5. Thanks to Michael from:

    reggiep (6th March 2012)

  6. #5

    Join Date
    Mar 2011
    Location
    Bournemouth
    Posts
    280
    Thank Post
    16
    Thanked 74 Times in 64 Posts
    Rep Power
    22
    If you still have problems, move your script to C:\Windows\Setup\Scripts\SetupComplete.cmd and remove the synchronous commands.

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 12
    Last Post: 6th September 2013, 09:46 PM
  2. Sysprep answer file windows 7
    By bart21 in forum O/S Deployment
    Replies: 4
    Last Post: 23rd May 2011, 12:28 PM
  3. unattend.xml not running on a custom syspreped image??
    By burgemaster in forum Windows 7
    Replies: 2
    Last Post: 25th March 2010, 10:21 AM
  4. Replies: 17
    Last Post: 19th March 2010, 11:51 PM
  5. Vista Sysprep Answer Files
    By FN-GM in forum Windows Vista
    Replies: 1
    Last Post: 16th October 2008, 03:12 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •