|
本帖最后由 2012doberman 于 2013-12-1 18:12 编辑
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set "imem=0" & set "vmem=0" & set "fmem=0" & set "str=i"
for /f "tokens=6,7 delims=:/ " %%a in ('rxprd mem') do (
set "!str!mem=%%a"
set "str=f"
set "!str!mem=%%a" & set "vmem=%%b"
)
set "fs=ntfs"
if /i "%imem%"=="N" set "imem=0"
if %imem% lss 768 set /a "size=%fmem%*7/10+%imem%"
if %imem% geq 768 set /a "size=%vmem%/2+%imem%"
if %imem% geq 1280 set /a "size=%vmem%/3+%imem%"
if %imem% geq 3072 set /a "size=%imem%"
if %fmem% leq 1280 set /a "size=%fmem%-384"
if %fmem% leq 768 set /a "size=%fmem%*/2"
if %fmem% leq 320 set /a "size=1" & set "fs=fat" & md %systemdrive%\Temp & setx Temp %systemdrive%\Temp & setx Tmp %systemdrive%\Temp
rxprd add -n %size% -t scsi -d B -v -i -dmm=COMPACT -f %fs% -c 4KB -l RAMDisk -X -N -T -s
Ability to use both:
SCSI - Disc |
|