Reasons for FirstLogonCommands to not execute? RRS feed

  • Вопрос

  • 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">
            <SynchronousCommand wcm:action="add">
              <CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
              <Description>Lite Touch new OS</Description>
            <SynchronousCommand wcm:action="add">
          <RegisteredOwner>Company Admin</RegisteredOwner>
        <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">

    Thanks in advance

    • Изменено zzmm200 22 июля 2019 г. 10:51
    22 июля 2019 г. 10:05

Все ответы

  • I am not sure but when I use FirstLogonCommands the order is tag is before the command.

    For Example:

            <SynchronousCommand wcm:action="add">
              <CommandLine>wscript.exe %SystemDrive%\LTIBootstrap.vbs</CommandLine>
            <SynchronousCommand wcm:action="add">

    You could test it.

    22 июля 2019 г. 11:50
  • Thanks for your reply. Unfortunately same result. Any other ideas?

    Does it matter for the FirstLogonCommands if my Win isn't activated yet when it is deployed?

    • Изменено zzmm200 22 июля 2019 г. 15:18
    22 июля 2019 г. 14:43
  • 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

    22 июля 2019 г. 18:11
  • Ordering of elements does not matter. They are not executing in order, instead the entire file is sent into the parser and it will (essentially) perform a transform to make use of the data.
    22 июля 2019 г. 19:26
  • Same result unfortunately. Doesn't seem to run.
    26 июля 2019 г. 10:42
  • It should run when the first local user account logs into the system. Are you logging in with a local account, domain account or Microsoft account? This difference might matter.
    26 июля 2019 г. 18:40
  • 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

    27 июля 2019 г. 17:37