- @echo off
- title 自动修改虚拟内存 BY CriD.CN
- color 3f
- mode con lines=15 cols=40
- echo.
- echo 本程序适用装机后的优化,
- echo 程序自动根据物理内存大小,
- echo 修改你的虚拟内存,初始值是
- echo 物理内存的1.5倍,最大值是
- echo 物理内存的2倍,虚拟内存将被
- echo 该到D:\下面.
- echo CriD.CN
- echo.
- setlocal enabledelayedexpansion
- cscript //H:cscript //s >nul
- for /f "tokens=2" %%i in ('systeminfo^|find "物理内存总量"') do (
- set size=%%i
- set size=!size: =!
- set /a size=!size!+10
- set /a n=!size!/64
- set /a size=64*!n!
- set /a minsize=!size!+!size!/2
- set /a maxsize=!size!*2
- pagefileconfig /create /i !minsize! /m !maxsize! /vo D: >nul
- pagefileconfig /delete /vo C: >nul
- )
- echo 修改完成!!
- echo.
- echo 2秒钟后自动退出
- ping 127.1 -n 2 >nul 2>nul
- exit
复制代码
|