https://moeclub.org/2018/11/13/685/?v=462

 

在安装 Win7 EMB(Thin PC) 时,有时会出现内存识别错误或内存识别不全等问题.
此补丁可以尝试修复此问题.

    • 一键修复
      1. 下载 PatchPAE.bat
      2. 双击运行.
      3. 重启系统.

注意: 自动创建一个新的引导启动项,不会损坏原系统文件.

    • 简单说明

此修补程序不启用测试签名模式.
此修补程序允许您在x86 Windows系统上使用超过4GB的RAM.
适用于Windows Vista SP2,Windows 7 SP0,Windows 7 SP1,Windows 8,Windows 8.1和Windows 10(10586).
在使用此补丁之前, 请确保已完全删除了您可能已使用的任何其他“RAM补丁”.

    • 源码地址

https://github.com/wj32/PatchPae2

  • PatchPAE.bat
@ECHO OFF&PUSHD %~DP0 &TITLE PatchPAE
setlocal enabledelayedexpansion
::Author MoeClub.org
color 87
cd.>%windir%\GetAdmin
if exist %windir%\GetAdmin (del /f /q "%windir%\GetAdmin") else (
echo CreateObject^("Shell.Application"^).ShellExecute "%~s0", "%*", "", "runas", 1 >> "%temp%\Admin.vbs"
"%temp%\Admin.vbs"
del /s /q "%temp%\Admin.vbs"
exit /b 2)
cls
 
set version_limit=61
 
for /f "skip=2 tokens=3" %%i in ('REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v "CurrentVersion"') do (set ver=%%i
for /f "delims=. tokens=1,2" %%m in ("!ver!") do (set ver_ten=%%m
set ver_num=%%n
set /a version = 10 * !ver_ten! + !ver_num!
) 
)
 
echo * System version: !ver!
 
if %version% GTR %version_limit% (
set WinNT1=ntoskrnx.exe
set WinNT2=ntoskrnl.exe
) else (
if %version% EQU %version_limit% (
set WinNT1=ntkrnlpx.exe
set WinNT2=ntkrnlpa.exe
) else (
call:ErrorExit
)
)
 
echo * Download: "%tmp%\PatchPae2.exe"
 
powershell.exe -command "& {$client = new-object System.Net.WebClient; $client.DownloadFile('https://moeclub.org/attachment/WindowsSoftware/PatchPae2','%tmp%\PatchPae2.exe')}" >NUL 2>NUL
if not exist "%tmp%\PatchPae2.exe" (call:ErrorExit)
 
cd /d %WINDIR%/System32
echo * Patch: "%WINDIR%/System32/%WinNT2%"
%tmp%\PatchPae2.exe -type kernel -o %WinNT1% %WinNT2% >NUL 2>NUL
 
if not %errorlevel% == 0 (call:ErrorExit)
echo * Patch: "%WINDIR%/System32/winload.exe"
%tmp%\PatchPae2.exe -type loader -o winloadp.exe winload.exe >NUL 2>NUL
 
if not %errorlevel% == 0 (call:ErrorExit)
 
echo * Set Boot Option.
for /f "delims={} tokens=2" %%i in ('bcdedit /copy {current} /d "Windows (PAE Patched)"') do (set BootID=%%i)
echo %BootID% |find "-" >NUL 2>NUL
if not %errorlevel% == 0 (call:ErrorExit)
bcdedit /set {%BootID%} path \Windows\system32\winloadp.exe >NUL 2>NUL
if not %errorlevel% == 0 (call:ErrorExit)
bcdedit /set {%BootID%} nointegritychecks 1 >NUL 2>NUL
if not %errorlevel% == 0 (call:ErrorExit)
bcdedit /set {bootmgr} default {%BootID%} >NUL 2>NUL
if not %errorlevel% == 0 (call:ErrorExit)
 
echo Press [ENTER] to reboot...
pause >NUL 2>NUL
shutdown -r -t 0
 
:ErrorExit
echo. 
echo Error, Press [ENTER] to exit.
pause >NUL 2>NUL
exit 1
GOTO:EOF