mirror of
https://github.com/bin456789/reinstall.git
synced 2025-06-07 21:09:56 +00:00
windows: 设置成高性能模式
This commit is contained in:
parent
4105a0bb41
commit
bd266fb12f
@ -19,7 +19,7 @@ rem echo a | find "a"
|
||||
rem 使用高性能模式
|
||||
rem https://learn.microsoft.com/windows-hardware/manufacture/desktop/capture-and-apply-windows-using-a-single-wim
|
||||
rem win8 pe 没有 powercfg
|
||||
call powercfg /s 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 2>nul
|
||||
powercfg /s SCHEME_MIN 2>nul
|
||||
|
||||
rem 安装 SCSI 驱动
|
||||
if exist X:\drivers\ (
|
||||
|
21
windows.xml
21
windows.xml
@ -64,24 +64,31 @@
|
||||
<settings pass="specialize">
|
||||
<component name="Microsoft-Windows-Deployment" processorArchitecture="%arch%" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<RunSynchronous>
|
||||
<!-- aws和华为云都要求设置为从不关闭显示器
|
||||
<!-- 大厂都要求设置高性能和从不关闭显示器
|
||||
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/prepare-for-upload-vhd-image#set-windows-configurations-for-azure
|
||||
https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/migrating-latest-types.html
|
||||
https://support.huaweicloud.com/usermanual-ims/zh-cn_topic_0047501112.html -->
|
||||
https://support.huaweicloud.com/usermanual-ims/zh-cn_topic_0047501112.html
|
||||
powercfg /aliases 能显示 GUID/名称 的对应关系,vista 也能使用名称 -->
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>1</Order>
|
||||
<Path>powercfg /setacvalueindex 381b4222-f694-41f0-9685-ff5bb260df2e 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0</Path>
|
||||
<Path>powercfg /setacvalueindex SCHEME_BALANCED SUB_VIDEO VIDEOIDLE 0</Path>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>2</Order>
|
||||
<Path>powercfg /setacvalueindex 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0</Path>
|
||||
<Path>powercfg /setacvalueindex SCHEME_MIN SUB_VIDEO VIDEOIDLE 0</Path>
|
||||
</RunSynchronousCommand>
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>3</Order>
|
||||
<Path>powercfg /setacvalueindex a1841308-3541-4fab-bc81-f71556f20b4a 7516b95f-f776-4464-8c53-06167f40cc99 3c0bc021-c8a8-4e07-a973-6b14cbcb2b7e 0</Path>
|
||||
<Path>powercfg /setacvalueindex SCHEME_MAX SUB_VIDEO VIDEOIDLE 0</Path>
|
||||
</RunSynchronousCommand>
|
||||
<!-- 设为高性能 -->
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>4</Order>
|
||||
<Path>powercfg /setactive SCHEME_MIN</Path>
|
||||
</RunSynchronousCommand>
|
||||
<!-- 启用 administrator 账户 -->
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>4</Order>
|
||||
<Order>5</Order>
|
||||
<!-- vista 没有自带 powershell -->
|
||||
<!-- <Path>powershell "$User = Get-WmiObject Win32_UserAccount | where SID -like *-500; $User.Disabled = $False; $User.Put()"</Path> -->
|
||||
<!-- win7 此时无法用 wmic useraccount -->
|
||||
@ -91,7 +98,7 @@
|
||||
</RunSynchronousCommand>
|
||||
<!-- 禁用保留空间 -->
|
||||
<RunSynchronousCommand wcm:action="add">
|
||||
<Order>5</Order>
|
||||
<Order>6</Order>
|
||||
<Path>reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\ReserveManager /v ShippedWithReserves /t REG_DWORD /d 0 /f</Path>
|
||||
<!-- 此时以下命令无效 -->
|
||||
<!-- <Path>DISM /Online /Set-ReservedStorageState /State:Disabled</Path> -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user