win11安装记录

硬件判断在选择安装到哪个磁盘,这个之前就判断了。

开了TPM 检测2.0就行,

如不满足

用pe安装,点击最外边的setup,不会判断硬件是否满足,直接可安装。

在当前系统下安装,如提示不满足,则,拖入bat命令,即可。

镜像在官网下载的,拖入bat,bat内容如下:

@(echo off% <#%) &color 07 &title Quick 11 iso esd wim TPM toggle by AveYo - with SendTo menu entry
set "0=%~f0" &set "1=%~f1"&set "2=%~2"& powershell -nop -c iex ([io.file]::ReadAllText($env:0)) &pause &exit/b ||#>)[1]
#:: what's new in v1.2: add uninstall when run again without parameters (issue #96)
$timer = $(get-date)
#:: Install to SendTo menu when run from another location
$SendTo = [Environment]::GetFolderPath('ApplicationData') + '\Microsoft\Windows\SendTo'
$Script = "$SendTo\Quick_11_iso_esd_wim_TPM_toggle.bat"
if (!$env:1 -and $env:0 -and !(test-path $Script)) {
write-host "`n No input iso / esd / wim file to patch! use 'Send to' context menu ...`n" -fore Yellow
copy $env:0 $Script -force
}
elseif (!$env:1 -and $env:0 -and (test-path $Script)) {
write-host "`n Removed 'Send to' entry - run again to install ...`n" -fore Magenta
del $Script -force
}
if (!$env:1) { return }
#:: Can force either patch or undo via second commandline parameter: 1 to patch 0 to undo
if (1 -eq $env:2) {$toggle = 1} elseif (0 -eq $env:2) {$toggle = 0} else {$toggle = 2}
#:: Verify extension is .iso .esd or .wim
$input = get-item -lit $env:1; $invalid = '.iso','.esd','.wim' -notcontains $input.Extension
if ($invalid) {write-host "`n Input is not a iso / esd / wim file ...`n" -fore Yellow; return }
try {[io.file]::OpenWrite($input).close()} catch {write-host "`n ERROR! $input read-only or in use ...`n" -fore Red; return }
#:: TPM patch via InstallationType Server
$typeC = '<INSTALLATIONTYPE>Client'; $typeS = '<INSTALLATIONTYPE>Server'
$block = 1048576; $chunk = 2097152; $count = [uint64]([IO.FileInfo]$input).Length / $chunk - 1
$bytes = new-object "Byte[]" ($chunk); $begin = [uint64]0; $final = [uint64]0; $limit = [uint64]0
function tochars {return [Text.Encoding]::GetEncoding(28591).GetString([Text.Encoding]::Unicode.GetBytes($args[0]))}
$find1 = tochars "</INSTALLATIONTYPE>"; $find2 = tochars "</WIM>"; $cli = tochars $typeC; $srv = tochars $typeS
$f = new-object IO.FileStream ($input, 3, 3, 1); $p = 0; $p = $f.Seek(0, 2)
write-host "$input`nsearching $p bytes, please wait ...`n"
for ($o = 1; $o -le $count; $o++) {
$p = $f.Seek(-$chunk, 1); $r = $f.Read($bytes, 0, $chunk); if ($r -ne $chunk) {write-host invalid block $r; break}
$u = [Text.Encoding]::GetEncoding(28591).GetString($bytes); $t = $u.LastIndexOf($find1, [StringComparison]4)
if ($t -ge 0) {
$f.Seek(($t -$chunk), 1) >''
for ($o = 1; $o -le $chunk; $o++) { $f.Seek(-2, 1) >''; if ($f.ReadByte() -eq 0xfe) {$begin = $f.Position; break} }
$limit = $f.Length - $begin; if ($limit -lt $chunk) {$x = $limit} else {$x = $chunk}
$bytes = new-object "Byte[]" ($x); $r = $f.Read($bytes, 0, $x);
$u = [Text.Encoding]::GetEncoding(28591).GetString($bytes); $t = $u.IndexOf($find2, [StringComparison]4)
if ($t -ge 0) {$f.Seek(($t + 12 -$x), 1) >''; $final = $f.Position} ; break
} else { $p = $f.Seek(-$chunk, 1)}
}
if ($begin -gt 0 -and $final -gt $begin) {
$x = $final - $begin; $f.Seek(-$x, 1) >''; $bytes = new-object "Byte[]" ($x); $r = $f.Read($bytes, 0, $x)
if ($r -ne $x) {break}
$t = [Text.Encoding]::GetEncoding(28591).GetString($bytes)
if ($t.IndexOf($cli, [StringComparison]4) -ge 0) {$src = 0} else {$src = 1}
if ($src -eq 0 -and $toggle -ne 0) {$old = $cli; $new = $srv} elseif ($src -eq 1 -and $toggle -ne 1) {$old = $srv; $new = $cli}
else {write-host "`n:) $input already has TPM patch $toggle"; $f.Dispose(); return}
$t = $t.Replace($old, $new); $t; $b = [Text.Encoding]::GetEncoding(28591).GetBytes($t); $f.Seek(-$x, 1) >''; $f.Write($b, 0, $x)
if ($src -eq 1) {write-host "`n :D TPM patch removed" -fore Green} else {write-host "`n:D TPM patch added" -fore Green}
$f.Dispose(); [GC]::Collect()
} else {write-host "`n;( TPM patch failed" -fore Red; $f.Dispose()}
#:: how quick was that??
$(get-date) - $script:timer
#:: done

 

本文作者:很多无尾熊

本文链接:https://www.cnblogs.com/gnz48/p/16169570.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   很多无尾熊  阅读(113)  评论(0编辑  收藏  举报
本站已运行[1093143642 ]
云阶月地,关锁千重。
💬
评论
📌
收藏
💗
关注
👍
推荐
🚀
回顶
收起
🔑
点击右上角即可分享
微信分享提示
  1. 1 所念皆星河 房东的猫
  2. 2 所念皆星河 CMJ
  3. 3 热河 南京市民
  4. 4 起风了2018夏 卖辣椒也用券
  5. 5 纸短情长2018夏 烟把儿乐队
  6. 6 关于郑州的记忆 南京市民
  7. 7 定西 南京市民
  8. 8 化作樱花树 SNH48
  9. 9 化青春的约定 SNH48
  10. 10 BINGO! SNH48
  11. 11 恋爱捉迷藏 (2016 Bravery·挑战B50特殊联合公演现场) GNZ48
  12. 12 365天的纸飞机 AKB48 Team SH
  13. 13 《瞬间的永恒》夜色钢琴曲 赵海洋
  14. 14 卡农 我的野蛮女友
  15. 15 爱有天意ost 未知
  16. 16 野蛮女友ost 未知
  17. 17 野蛮女友ost 未知
  18. 18 野蛮女友ost 未知
  19. 19 野蛮女友ost 未知
  20. 20 野蛮女友ost 未知
  21. 21 我想念你...自撸管的悲伤 未知
  22. 22 在人间 未知
  23. 23 野蛮女友ost 未知
  24. 24 野蛮女友ost 未知
  25. 25 風になる つじあやの
  26. 26 潮鳴り 折戸伸治
  27. 27 青石巷 魏琮霏
  28. 28 坐在巷口的那对男女 自然卷
  29. 29 优美的小调(钢琴曲) 张宇桦
  30. 30 天之痕(钢琴版) 群星
  31. 31 花がとぶ飛ぶ 邱有句,李德奎
  32. 32 挺你 IDOL SCHOOL
  33. 33 Eternity 李墨染
  34. 34 北京东路的日子 汪源,刘千楚,徐逸昊,鲁天舒,姜玮珉,胡梦原,张鎏依,梁竞元,游彧涵,金书援,许一璇,张夙西
  35. 35 初恋サイダー Buono!
  36. 36 花朝可期——A-SOUL原创应援曲 林小暗
  37. 37 花之祭 SNH48
  38. 38 ハートサングラス 26時のマスカレイド
  39. 39 47の素敵な街へ(チーム8) AKB48
  40. 40 优美的小调(钢琴曲) 张宇桦
  41. 41 风のように S.E.N.S.
  42. 42 秋~華恋~ α·Pav
  43. 43 同窗 同窗
  44. 44 远方 同窗
  45. 45 流着泪微笑 (合唱版) 鞠婧祎,徐晨辰
  46. 46 初恋蝴蝶 中泰
  47. 47 初恋蝴蝶 jxl
关于郑州的记忆 - 南京市民
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.
西雅图
14:03发布
西雅图
14:03发布
9°
东南风
2级
空气质量
相对湿度
80%
今天
中雨
4°/13°
周一
4°/10°
周二
中雨
3°/8°