我正在尝试在Windows 7无人值守安装的OOBE传递中执行此命令:
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<AutoLogon>
<Enabled>true</Enabled>
<Username>Administrator</Username>
<Password>
<Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
<PlainText>false</PlainText>
</Password>
</AutoLogon>
<Display>
<ColorDepth>32</ColorDepth>
<DPI>96</DPI>
<HorizontalResolution>1280</HorizontalResolution>
<VerticalResolution>800</VerticalResolution>
</Display>
<OOBE>
<HideEULAPage>true</HideEULAPage>
<NetworkLocation>Other</NetworkLocation>
<ProtectYourPC>3</ProtectYourPC>
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
</OOBE>
<TimeZone>Russian Standard Time</TimeZone>
<UserAccounts>
<AdministratorPassword>
<Value>QQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value>
<PlainText>false</PlainText>
</AdministratorPassword>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
<PlainText>false</PlainText>
</Password>
<DisplayName>Admin</DisplayName>
<Group>Administrators</Group>
<Name>Admin</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<LogonCommands>
<AsynchronousCommand wcm:action="add">
<CommandLine>reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v prog /t REG_SZ /d c:\Myprogram\prog.exe /f</CommandLine>
<Order>1</Order>
</AsynchronousCommand>
<AsynchronousCommand wcm:action="add">
<Order>4</Order>
<CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Network\NwCategoryWizard" /v Show /t REG_DWORD /d 00000000 /f</CommandLine>
</AsynchronousCommand>
<AsynchronousCommand wcm:action="add">
<Order>3</Order>
<CommandLine>reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Network\NwCategoryWizard" /v Suppress /t REG_DWORD /d 00000001 /f</CommandLine>
</AsynchronousCommand>
<AsynchronousCommand wcm:action="add">
<Order>2</Order>
<CommandLine>reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run /v Teamviewer /t REG_SZ /d C:\Program Files\TeamViewer\TeamViewer.exe /f</CommandLine>
</AsynchronousCommand>
</LogonCommands>
</component>
安装完成后注册表未更改。为什么?
(我也尝试使用类似命令运行.cmd文件并导入.reg文件,但它不起作用。)