|
@ECHO OFF
:: Batch for auto setting fbwf and ramdriv size (using Sherpya′s autoramresizer.exe)
:: fbwf will be set to 20% and B: to 5% of total system ram
:: Use PSTAT.EXE from the NT 4 Resource Kit
:: to find the amount of RAM installed (in KB)
FOR /F "tokens=2 delims=K " %%A IN ('PSTAT ^| FIND "Memory:"') DO SET RAM=%%A
:: The following command line is added to round up instead of down;
:: change the value from 1023 to 512 for "mathematical" rounding,
:: or remove the line to round down
SET /A RAM = %RAM% + 1023
:: Convert from KiloBytes to MegaBytes and set to 20%
SET /A RAM = %RAM% / 1024 / 5
:: setting fbwf 20% of system memory
REG.EXE ADD "HKLM\System\ControlSet001\Services\FBWF" /f /v WinPECacheThreshold /t REG_DWORD /d %RAM%
:: setting B: 10% of system memory
SET /A RAM = %RAM% / 2
autoramresizer.exe -l %RAM% -h %RAM%
sc.exe start fbwf
exit
这个怎么用?放在哪个文件夹中。 |
|