为什么 MDT TaskSequence 会忽略对 Winlogon 注册表的更改?

Why are changes to the Winlogon registry being ignored by MDT TaskSequence?

我正在 MDT 中设置任务序列 (TS) 以部署 Win10 IoT Enterprise。作为 TS 中的最后步骤之一,我正在尝试将用户帐户的自动登录添加到注册表中。但是当 TS 完成并且我检查时,更改要么没有进行,要么已被一些清理脚本重置。

我在 TS 中创建了一个新的 "Run Command Line" 步骤,就在 MDT 自动生成的安装应用程序步骤之后。此步骤运行我添加到 Deploy/Scripts 文件夹中的脚本。我这里没有错误,但也没有结果。

我尝试将正确的注册表设置导出到 .reg 文件并使用 "Run Command Line" 步骤导入这些设置。同样,没有错误也没有结果。

我已将这两个步骤在列表中下移,因此它们是 TS 所做的最后一件事。同样,没有错误也没有结果。

cmd /c reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d 1 /f
cmd /c reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /t REG_SZ /d <username>/f
cmd /c reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d <Domain> /f
cmd /c reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /t REG_SZ /d <password> /f
cmd /c reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoLogonCount /t REG_DWORD /d 500000 /f

我希望自动设置自动登录。如果没有,则必须有一个如何设置它的过程,这不仅感觉没有必要,而且如果忘记了它也是错误的来源。

经过更多谷歌搜索,我终于找到了:

https://ccmcache.wordpress.com/2018/02/07/workaround-for-windows-10-1709-autoadminlogon-at-the-end-of-configmgr-osd-task-sequence/

哪里有解决办法。一个丑陋的,但我发现唯一可行的方法。所以感谢这篇文章的作者。