官方windows11.iso镜像文件安装操作系统时,会强制要求联网验证,否则无法继续安装操作系统,跳过联网登录账号的方式为:按下【shift+F10】快捷键,调出cmd命令窗口,输入命令
OOBE\BYPASSNRO
等待重新启动后,即可跳过联网登录账号。
在win10之后,微软官方已经不再支持wintogo,对于有该需求的朋友们,可以选择使用ventoy加vhd引导启动的方式实现wtg的效果(ventoy作为开源工具,具体能力可参见官网Ventoy)。
将win11安装到vhdx之后,普通系统切换windows to go的方法(出处https://gist.github.com/muink/72049cb50dabf2249c42eba971484ba9),执行如下脚本(另存为switch-to-WTG.bat):
- :: switch to WTG
- :: switch to WTG
- :: Author: muink
-
-
- @echo off
- %~1 mshta vbscript:createobject("shell.application").shellexecute("%~f0","::","","runas",1)(window.close)&exit
-
- ::设定USB启动
- for /f "tokens=2* delims= " %%i in ('reg query HKLM\SYSTEM\HardwareConfig /v LastConfig 2^>nul^|findstr /i LastConfig') do set "guid=%%j"
- reg add HKLM\SYSTEM\HardwareConfig\%guid% /v BootDriverFlags /t reg_dword /d 0x14 /f
- reg add HKLM\SYSTEM\CurrentControlSet\Control /v PortableOperatingSystem /t reg_dword /d 1 /f
-
- ::防止本机磁盘自动联机(保持脱机)
- reg add HKLM\SYSTEM\CurrentControlSet\Services\partmgr\Parameters /v SanPolicy /t reg_dword /d 4 /f
VHD启动时,阻止动态扩展到完整大小,将以下内容存储为reg执行修改注册表即可:
- Windows Registry Editor Version 5.00
-
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\FsDepends\Parameters]
- "VirtualDiskExpandOnMount"=dword:00000004