内気なもんた君

時々日本語化してます

(追記) Autounattend.xml (自動応答ファイル) の生成

Autounattend.xml (自動応答ファイル) の生成

追記 :

<LogonCount>1</LogonCount>
初回ログオン以降パスワードを求められるのでこの行を削除してください。
 
追記2 :
<FullName>********</FullName> を追加しました。
これが無いと動作的には問題ないけど、winverなどのコマンドでユーザー名が表示されません。
レジストリで言うと、
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]
"RegisteredOwner"="********"
が作成されません。

 

オンラインで応答ファイルを生成してくれます

Generate autounattend.xml files for Windows 10/11

 

ローカルアカウントでのインストールが厳しくなっていく状況にあっては、Autounattend.xml は必須となるでしょう。

 

上のサイトでは、基本的な設定からカスタマイズまで色々細かに設定できます。

ただ、余計なものも数多くあるので生成後には編集が必要になります。

 

- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -

余計なものを省いて極力シンプルにしたサンプル。

 

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UILanguage>ja-JP</UILanguage>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ImageInstall>
<OSImage>
<Compact>false</Compact>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/INDEX</Key>
<Value>1</Value>
</MetaData>
</InstallFrom>
</OSImage>
</ImageInstall>
<UserData>
<AcceptEula>true</AcceptEula>
<FullName>********</FullName>
</UserData>
<UseConfigurationSet>false</UseConfigurationSet>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<ProductKey>*****-*****-*****-*****-*****</ProductKey>
<TimeZone>Tokyo Standard Time</TimeZone>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-International-Core" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<InputLocale>ja-JP</InputLocale>
<SystemLocale>ja-JP</SystemLocale>
<UILanguage>ja-JP</UILanguage>
<UserLocale>ja-JP</UserLocale>
</component>
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Name>********</Name>
<DisplayName>********</DisplayName>
<Group>Administrators</Group>
<Password>
<Value>********</Value>
<PlainText>true</PlainText>
</Password>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<AutoLogon>
<Username>********</Username>
<Enabled>true</Enabled>
<LogonCount>1</LogonCount>
<Password>
<Value>********</Value>
<PlainText>true</PlainText>
</Password>
</AutoLogon>
<OOBE>
<ProtectYourPC>3</ProtectYourPC>
<HideEULAPage>true</HideEULAPage>
<HideWirelessSetupInOOBE>false</HideWirelessSetupInOOBE>
<HideOnlineAccountScreens>false</HideOnlineAccountScreens>
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
<SkipUserOOBE>true</SkipUserOOBE>
<SkipMachineOOBE>true</SkipMachineOOBE>
</OOBE>
<FirstLogonCommands>
   <SynchronousCommand wcm:action="add">
      <CommandLine>REG IMPORT "%SystemRoot%\Setup\Scripts\25H2_HKCU.reg"</CommandLine>
      <Description>IMPORT HKCU</Description>
      <Order>1</Order>
   </SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
</unattend>
- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -
エディションが複数ある場合は、イメージインデックスの番号を修正してください。
黄色の文字は各自編集してください。
 
Windows 10 19045.6396 のクリーンインストールで動作確認済みです。