|
本帖最后由 chishingchan 于 2021-11-25 10:38 编辑
在 Microsoft Evaluation Center 试用 Windows Server 2022
在选择安装时注意选择带 Desktop 的!
激活:
- @echo off
- :: Windows Server 2022 Datacenter:WX4NM-KYWYW-QJJR4-XV3QB-6VM33
- :: Windows Server 2022 Standard:VDYBN-27WPP-V4HQT-9VMD4-VMK7H
- slmgr /upk
- slmgr /ipk VDYBN-27WPP-V4HQT-9VMD4-VMK7H
- slmgr /skms kms.cangshui.net
- slmgr /ato
复制代码
不需要按 三个组合键:- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableCAD /t REG_DWORD /d 1 /f
复制代码- @echo off
- :: 用户帐户控制: 在管理审批模式下管理员的提升提示行为:不提示,直接提升
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /f /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 0
- :: 用户帐户控制: 对内置管理员帐户使用管理审批模式:已启用
- reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /f /v "FilterAdministratorToken" /t REG_DWORD /d 1
- :: 获得所有权
- reg add "HKCR\*\shell\runas" /f /ve /t REG_SZ /d "获得所有权"
- reg add "HKCR\*\shell\runas" /f /v "HasLUAShield" /t REG_SZ /d ""
- reg add "HKCR\*\shell\runas" /f /v "NoWorkingDirectory" /t REG_SZ /d ""
- reg add "HKCR\*\shell\runas\command" /f /ve /t REG_SZ /d "cmd.exe /c takeown /f "%%1" && icacls "%%1" /grant administrators:F"
- reg add "HKCR\*\shell\runas\command" /f /v "IsolatedCommand" /t REG_SZ /d "cmd.exe /c takeown /f "%%1" && icacls "%%1" /grant administrators:F"
- reg add "HKCR\Directory\shell\runas" /f /ve /t REG_SZ /d "获得所有权"
- reg add "HKCR\Directory\shell\runas" /f /v "HasLUAShield" /t REG_SZ /d ""
- reg add "HKCR\Directory\shell\runas" /f /v "NoWorkingDirectory" /t REG_SZ /d ""
- reg add "HKCR\Directory\shell\runas\command" /f /ve /t REG_SZ /d "cmd.exe /c takeown /f "%%1" /r /d y && icacls "%%1" /grant administrators:F /t"
- reg add "HKCR\Directory\shell\runas\command" /f /v "IsolatedCommand" /t REG_SZ /d "cmd.exe /c takeown /f "%%1" /r /d y && icacls "%%1" /grant administrators:F /t"
- :: 选择 IME 默认模式:英语
- reg add "HKCU\SOFTWARE\Microsoft\InputMethod\Settings\CHS" /f /v "Default Mode" /t REG_DWORD /d 0
- :: 修改启动菜单界面(传统文本模式)
- bcdedit /set {default} bootmenupolicy legacy
- bcdedit /set {ntldr} description "Windows XP"
- :: 修改菜单默认启动时间
- bcdedit /timeout 5
- rem 显示桌面图标:计算机
- reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /f /v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0
- rem 显示桌面图标:用户的文档(件)
- reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /f /v "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" /t REG_DWORD /d 0
- rem 显示桌面图标:网络
- reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /f /v "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /t REG_DWORD /d 0
复制代码- @echo off
- :: 检测 SID 值
- for /f "delims=" %%a in ('wmic userAccount where "Name='%userName%'" get SID /value') do call set %%a
- :: 禁用关闭事件跟踪程序
- reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\Reliability" /f /v "ShutdownReasonOn" /t REG_DWORD /d 0
- reg add "HKU\%SID%\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8CBE2C7A-EB5F-4EDA-85DB-B8E79B27E05C}Machine\Software\Policies\Microsoft\Windows NT\Reliability" /f /v "ShutdownReasonOn" /t REG_DWORD /d 0
- reg add "HKU\%SID%\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects\{8CBE2C7A-EB5F-4EDA-85DB-B8E79B27E05C}Machine\Software\Policies\Microsoft\Windows NT\Reliability" /f /v "**del.ShutdownReasonUI" /t REG_SZ /d " "
复制代码
|
|