Windows 10: Sysprep unattend first logon command error

Discus and support Sysprep unattend first logon command error in Windows 10 Installation and Upgrade to solve the problem; Hello, I am trying to create admin user that has "Password never expires" option with Unattend.xml. As I understand this can not be done while... Discussion in 'Windows 10 Installation and Upgrade' started by Sven Sivic, Nov 21, 2019.

  1. Sysprep unattend first logon command error


    Hello,


    I am trying to create admin user that has "Password never expires" option with Unattend.xml. As I understand this can not be done while Sysprep, but rather on first log on. Therefore I wrote an Unattend.xml which looks like this:



    <?xml version="1.0" encoding="utf-8"?>

    <unattend xmlns="urn:schemas-microsoft-com:unattend">

    <settings pass="oobeSystem">

    <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">

    <OOBE>

    <HideEULAPage>true</HideEULAPage>

    <ProtectYourPC>1</ProtectYourPC>

    <HideLocalAccountScreen>true</HideLocalAccountScreen>

    <HideOnlineAccountScreens>true</HideOnlineAccountScreens>

    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>

    </OOBE>

    <UserAccounts>

    <LocalAccounts>

    <LocalAccount wcm:action="add">

    <DisplayName>wsadmin</DisplayName>

    <Name>wsadmin</Name>

    <Password>

    <Value>somepassword</Value>

    <PlainText>false</PlainText>

    </Password>

    <Group>Administrators</Group>

    </LocalAccount>

    </LocalAccounts>

    </UserAccounts>

    </component>

    <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>hr-HR</InputLocale>

    <SystemLocale>hr-HR</SystemLocale>

    <UserLocale>hr-HR</UserLocale>

    </component>

    </settings>

    <settings pass="oobeSystem">

    <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">

    </component>

    </settings>

    <AutoLogon>

    <Enabled>true</Enabled>

    <LogonCount>1</LogonCount>

    <Username>wsadmin</Username>

    <Password>

    <Value>somepassword</Value>

    <PlainText>true</PlainText>

    </Password>

    </AutoLogon>

    <FirstLogonCommands>

    <SynchronousCommand wcm:action="add">

    <CommandLine>cmd /C wmic useraccount where "name='wsadmin'" set PasswordExpires=FALSE</CommandLine>

    <Description>Password never expires wsadmin</Description>

    <RequiresUserInput>false</RequiresUserInput>

    <Order>1</Order>

    </SynchronousCommand>

    </FirstLogonCommands>



    </unattend>



    I get error that <SynchronousCommand wcm:action="add"> is not valid. Any ideas?


    Thanks in advance



    Sven


    :)
     
    Sven Sivic, Nov 21, 2019
    #1
  2. John Ado Win User

    SysPrep Advice

    Hi Joseph,

    The topic that you raised is beyond the scope of support for this site which focuses more on home and personal end users. Here's what I found about SysPrep:


    However these are old articles and the process may have been changed already. You may re-post this question in

    TechNet Forums
    for further assistance.

    All the best.
     
    John Ado, Nov 21, 2019
    #2
  3. Kari Win User
    Customize Windows 10 Image in Audit Mode with Sysprep  


    Just to add something, clarifying this.

    There are two ways to sysprep with an answer file.

    Method 1:
    • Save the answer file in C:\Windows\System32\Sysprep folder as unattend.xml (you must use this name!)
    • Run the sysprep command without /unattend switch, the answer file will be automatically read and used, machine is automatically shut down after the sysprep if /quit or /reboot switches are not used
    • Example commands:
      • sysprep /generalize /oobe (sysprep with unattend.xml, shutdown when ready)
      • sysprep /generalize /oobe /quit (sysprep with unattend.xml,, quit to desktop when ready)
      • sysprep /generalize /oobe /reboot (sysprep with unattend.xml, reboot to OOBE when ready)
    Method 2:
    • Save the answer file anywhere you want to naming it as you wish with the extension .xml
    • Run the sysprep command with /unattend switch giving the name and location of the answer file you want to be read and used
    • Example command:
      • sysprep /generalize /oobe /shutdown /unattend:X:\MyAnswerFile.xml
     
  4. Sysprep unattend first logon command error

    Sysprep Error

    hello i can`t sysprep windows 8.1 in vmware workstation here is error log

    2019-05-16 05:19:18, Info [0x0f004d] SYSPRP The time is now 2019-05-16 05:19:18

    2019-05-16 05:19:18, Info [0x0f004e] SYSPRP Initialized SysPrep log at c:\Windows\System32\Sysprep\Panther

    2019-05-16 05:19:18, Info [0x0f0054] SYSPRP ValidateUser:User has required privileges to sysprep machine

    2019-05-16 05:19:18, Info [0x0f007e] SYSPRP FCreateTagFile:Tag file c:\Windows\System32\Sysprep\Sysprep_succeeded.tag does not already exist, no need to delete anything

    2019-05-16 05:19:18, Warning SYSPRP WinMain: File operations pending

    2019-05-16 05:19:18, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'GENERALIZE'

    2019-05-16 05:19:18, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'OOBE'

    2019-05-16 05:19:18, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'SHUTDOWN'

    2019-05-16 05:19:18, Info [0x0f005f] SYSPRP ParseCommands:Found supported command line option 'UNATTEND'

    2019-05-16 05:19:18, Info [0x0f00d7] SYSPRP WinMainSysprep unattend first logon command error :pre-validing 'cleanup' internal providers.

    2019-05-16 05:19:18, Info SYSPRP RunExternalDlls:Running platform actions specified in action file for phase 3

    2019-05-16 05:19:18, Error [0x0f00bb] SYSPRP SysprepSession::CreateSession: Action XML file C:\Windows\System32\Sysprep\ActionFiles\Cleanup.xml does not exist[gle=0x00000002]

    2019-05-16 05:19:18, Error SYSPRP RunPlatformActions:Could not create SysprepSession; dwRet = 0x2[gle=0x00000002]

    2019-05-16 05:19:18, Error [0x0f0070] SYSPRP RunExternalDlls:An error occurred while running registry sysprep DLLs, halting sysprep execution. dwRet = 0x2[gle=0x00000002]

    2019-05-16 05:19:18, Error [0x0f00d8] SYSPRP WinMain:Hit failure while pre-validate sysprep cleanup internal providers; hr = 0x80070002[gle=0x00000002]

    2019-05-16 05:19:20, Info [0x0f0052] SYSPRP Shutting down SysPrep log

    2019-05-16 05:19:20, Info [0x0f004d] SYSPRP The time is now 2019-05-16 05:19:20
     
    KellyMeyers1, Nov 21, 2019
    #4
Thema:

Sysprep unattend first logon command error

Loading...
  1. Sysprep unattend first logon command error - Similar Threads - Sysprep unattend logon

  2. logon error

    in Windows 10 Gaming
    logon error: This is what happens when I log on to Windows XP https://answers.microsoft.com/en-us/windows/forum/all/logon-error/8d297b8e-4fff-4745-b318-cc8877e4e79e
  3. logon error

    in Windows 10 Software and Apps
    logon error: This is what happens when I log on to Windows XP https://answers.microsoft.com/en-us/windows/forum/all/logon-error/8d297b8e-4fff-4745-b318-cc8877e4e79e
  4. Win10 Pro x64 Ver 2004 Sysprep Unattend Problems

    in Windows 10 Installation and Upgrade
    Win10 Pro x64 Ver 2004 Sysprep Unattend Problems: Hello, I'm having issues with doing an unattend sysprep file on the Win10 Pro x64 Version 2004 (Build 19041). I had a working version of the file for the Win10 Pro x641607 version (Build 14393) I used Kari's Win10 Audit Mode with Sysprep tutorial (for both). The machine...
  5. Hidden "Set a PIN" Windows on first logon

    in Windows Hello & Lockscreen
    Hidden "Set a PIN" Windows on first logon: Edition: Windows 10 Business Version: 1909 OS Build: 18363.535 The build is Azure AD registered and upon first logon the users are prompted to enroll with "Windows Hello". They click on "Setup PIN", configure for MFA, then presented with a Blue Screen with a white...
  6. Unattended setup (Sysprep & unattend.xml) is not working for me

    in Windows 10 Installation and Upgrade
    Unattended setup (Sysprep & unattend.xml) is not working for me: I've been trying to create a customized Win10 Pro (Build 1903) install image for the last week or so. No matter how many tutorials I follow, answer files I create, or installs I perform, I just cannot get it to work properly. Every time I go to install Windows from my custom...
  7. Sysprep Errors on 1809

    in Windows 10 Software and Apps
    Sysprep Errors on 1809: I'm building a virtual machine (VM) to be sysprep'd and captured as a base image. Currently our organization uses LTSB and have not historically had to deal with Windows Store Apps but LTSB is changing in the coming year and moving to a Professional/Enterprise build makes...
  8. Sysprep Error - Cannot run sysprep

    in Windows 10 Backup and Restore
    Sysprep Error - Cannot run sysprep: Hello, I wondered if someone has any ideas.* I'm trying to do a sysprep but I keep getting the error below. Code: 2018-05-29 15:53:09, Error SYSPRP Package 7EE7776C.LinkedInforWindows_2.1.2639.0_neutral__w1wdnht996qgy was installed for a user, but not provisioned for all...
  9. Surface Pro 4 Unattended Sysprep Issue

    in Windows 10 Installation and Upgrade
    Surface Pro 4 Unattended Sysprep Issue: Hi Guys, Im attempting create an unattended sysprep windows 10 installation (1607) for the Surface Pro 4 using a USB and WinPE. I dont have the current script with me but the process is roughly the following; Install win 10 - audit mode Generate an unattend.xml using...
  10. Sysprep errors

    in Windows 10 Installation and Upgrade
    Sysprep errors: I'm using an upgraded version of Windows 10, and I'm trying to do a sysprep on it. I've already completed the registry changes needed, but I'm still getting errors. If I could get some help on figuring out what needs to be done to fix it, that would be great. Here is the...

Users found this page by searching for:

  1. automatically log in first time to sysprep machine