Tazatel
Reasons for FirstLogonCommands to not execute?

Dotaz
-
I'm building and deploying a Windows 10 Pro image with WDS & MDT and every tweak and task is pretty much done except for some stuff that needs to be done through FirstLogonCommands. The problem is that my FirstLogonCommand doesn't seem to execute and I can't figure out why.
- No errors are present in setuperr.log and setupact.log has a mention of executing the FirstLogonCommand:
2019-07-22 11:08:31, Info [Shell Unattend] LogonCommands: Set command 'C:\windows\setup\scripts\FirstLogon.cmd'
- Autologin is enabled in Unattend.xml with an Administrator account and the autologin works.
- The unattended install is done with an Administrator account.
- My FirstLogonCommands script is copied to C:\Windows\Setup\Scripts\FirstLogon.cmd , so the file is present on the machine that receives the image.
- If I execute the FirstLogon.cmd command manually on the machine that received the image, it runs without any problems.
- The image is based on Windows 10 PRO 1803 from VLSC.
What could be reasons for the FirstLogonCommand not executing?Below is a part of my Unattend.xml:
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="SECRET" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<UserAccounts>
<AdministratorPassword>
<Value>SECRET</Value>
<PlainText>true</PlainText>
</AdministratorPassword>
</UserAccounts>
<AutoLogon>
<Enabled>true</Enabled>
<Username>administrator</Username>
<Domain>.</Domain>
<Password>
<Value>SECRET</Value>
<PlainText>true</PlainText>
</Password>
<LogonCount>999</LogonCount>
</AutoLogon>
<Display>
<ColorDepth></ColorDepth>
<HorizontalResolution></HorizontalResolution>
<RefreshRate></RefreshRate>
<VerticalResolution></VerticalResolution>
</Display>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
<Description>Lite Touch new OS</Description>
<Order>1</Order>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<CommandLine>c:\windows\setup\scripts\FirstLogon.cmd</CommandLine>
<Order>2</Order>
</SynchronousCommand>
</FirstLogonCommands>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Work</NetworkLocation>
<ProtectYourPC>1</ProtectYourPC>
<HideLocalAccountScreen>true</HideLocalAccountScreen>
<HideOnlineAccountScreens>true</HideOnlineAccountScreens>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
</OOBE>
<RegisteredOrganization>Company</RegisteredOrganization>
<RegisteredOwner>Company Admin</RegisteredOwner>
<TimeZone></TimeZone>
</component>
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="SECRET" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<InputLocale>0409:00000409</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
<UserLocale>en-US</UserLocale>
</component>
</settings>Thanks in advance
- Upravený zzmm200 pondělí 22. července 2019 10:51
Všechny reakce
-
I am not sure but when I use FirstLogonCommands the order is tag is before the command.
For Example:
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
</SynchronousCommand>
<SynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>c:\windows\setup\scripts\FirstLogon.cmd</CommandLine>
</SynchronousCommand>
</FirstLogonCommands>You could test it.
-
-
This is a batch file so you will want to run cmd.exe to execute it as follows:
cmd.exe /c c:\windows\setup\scripts\FirstLogon.cmd
Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com
- Upravený Sean LimingMVP pondělí 22. července 2019 18:11
- Navržen jako odpověď David_Ding2018Microsoft contingent staff, Moderator úterý 23. července 2019 6:48
-
-
-
-
Can you run it manually after OS installation?
Typically, the Pass7 commands run when you log into an Administrator account for the first time. If the system boots into a User account you will have to log out and log into an Administrator account for the commands to run.
Sean Liming - Book Author: Starter Guide Windows 10 IoT Enterprise - www.annabooks.com / www.seanliming.com
- Upravený Sean LimingMVP sobota 27. července 2019 17:40