Sysprep unattend first logon command error

S

Sven Sivic

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


Continue reading...
 
Back
Top Bottom