Windows 7 の 無人インストール

Windows 10 のサポートが切れるせいかどうか分らんけど何故か Windows 7 のシェアが上がってきているらしい。
ここんところ、Windows 11 が暇なんで Windows 7 をいじってみる。
まずは、Autounattend.xml の作成からだ。
Win10 やWin11 のものはそのままでは使えないので編集する必要がある。
- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -
* Autounattend.xml の内容 (Windows 7 用)
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>ja-JP</UILanguage>
</SetupUILanguage>
<SystemLocale>ja-JP</SystemLocale>
<UILanguage>ja-JP</UILanguage>
<UserLocale>ja-JP</UserLocale>
</component>
<component name="Microsoft-Windows-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<UserData>
<ProductKey>
<Key>*****-*****-*****-*****-*****</Key>
<WillShowUI>Never</WillShowUI>
</ProductKey>
<AcceptEula>true</AcceptEula>
<FullName>********</FullName>
</UserData>
<ImageInstall>
<OSImage>
<InstallFrom>
<MetaData wcm:action="add">
<Key>/IMAGE/NAME</Key>
<Value>Windows 7 Enterprise</Value>
</MetaData>
</InstallFrom>
<WillShowUI>OnError</WillShowUI>
</OSImage>
</ImageInstall>
</component>
</settings>
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ComputerName>Ryzen-PC</ComputerName>
<TimeZone>Tokyo Standard Time</TimeZone>
</component>
</settings>
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<OOBE>
<HideEULAPage>true</HideEULAPage>
<SkipUserOOBE>true</SkipUserOOBE>
<ProtectYourPC>3</ProtectYourPC>
</OOBE>
<UserAccounts>
<LocalAccounts>
<LocalAccount wcm:action="add">
<Password>
<Value>********</Value>
<PlainText>true</PlainText>
</Password>
<DisplayName>********</DisplayName>
<Group>Administrators</Group>
<Name>********</Name>
</LocalAccount>
</LocalAccounts>
</UserAccounts>
<AutoLogon>
<Username>********</Username>
<Domain>.</Domain>
<Password>
<Value>********</Value>
<PlainText>true</PlainText>
</Password>
<Enabled>true</Enabled>
</AutoLogon>
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<CommandLine>REG IMPORT "C:\Windows\Setup\Scripts\W7_HKCU.reg"</CommandLine>
<Description>IMPORT HKCU</Description>
<Order>1</Order>
</SynchronousCommand>
</FirstLogonCommands>
</component>
</settings>
</unattend>
- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -
* 注意点
・ インストールイメージが一つだけでも
<Value>Windows 7 Enterprise</Value>
のようにフルネームで指定しなければならない。
・ 黄色で表示されているところは各自編集してください。
・ インストール先は指定していないので、最初にパーティション選択画面が出ます。
Windows 11のものと比べるとだいぶ端折ってる感はあるけど、インストールできればいいので深く考えないでください。
- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -
久々に Windows 7 をいじってみたけど、やっぱいじりがいがある。
セットアップファイルやテーマファイルなど、いじろうと思えばなんぼでもあるもんなぁ・・・
昔カスタマイズしたファイルがどこかに消えてしまったので、新たにカスタマイズするとなるとかなり苦労しそうだ。(今更するつもりはないけど)
