Administrator を有効にする
net user administrator /active:yes
ユーザーを削除する
%SystemRoot%\system32\sysprep\sysprep.exe を実行する
起動
Windows を起動しています
レジストリ設定を更新しています
サービスを開始しています
デバイスのインストール中
システム設定の適用中
コンピューターを再起動した後、… (忘れた)
再起動
Windows を起動しています
初めてコンピューターを使用するための準備をしています
ビデオのパフォーマンスを確認しています
Windows のセットアップ
地域と言語の設定
ユーザー名とコンピューター名の設定
パスワードの設定
ライセンスに対する同意
Windows update の設定
日付と時刻の設定
ネットワーク接続の設定
ようこそ
デスクトップの準備をしています
- sysprep に関するファイルは %windir%\panther 以下にある
- Windows のライセンス認証は継続する
- Administrator は無効になる
- Google 日本語入力 は選択不可能になる
- 大嘘。デフォルトが Microsoft IME だけになっているので入力方法を追加する
- Intel HD Graphics はドライバーが当たらない
- setup.exe -overwrite -s -nowinsat
- ディスプレイドライバーでは珍しくないらしい
- slmgr.vbs -dlv で “残りの Windows 猶予期間 リセット可能回数” がデクリメントされる
- これは sysprep の規定の動作である。自動応答ファイルで SkipRearm を設定することで回避できる
メーカー製の PC の unattend.xml を見たらドライバーやアプリケーションはセットアップ時に実行しているようだ(多分)。PnpUtil とか初めて知った。
nt5 から考えると地味に進化している。後は multi language に統一してくれたらもっと楽になるんだけど。
unattend.xml
上記の問題は以下の unattend.xml を適用することでだいたい解決。無線 AP のパスワードとかまで保持されるので事前に消去すること。
<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="generalize"> <component name="Microsoft-Windows-PnpSysprep" 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"> <PersistAllDeviceInstalls>true</PersistAllDeviceInstalls> </component> <component name="Microsoft-Windows-Security-Licensing-SLC" 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"> <SkipRearm>1</SkipRearm> </component> </settings> </unattend>
sysprep /generalize /oobe /unattend:unattend.xml
Windows System Image Manager
WIndows AIK をインストールして %ProgramFiles%\Windows AIK\Image Manager だったか忘れたけどそのへんからファイル持って来れば、Windows AIK をアンインストールしても動く。
コメントする