|
借地请教老九大侠,虚拟内存设置需要哪些步骤。因 PECMD 有最小值低于可用内存时不设置的限制,我想用AUTOIT替代设置,但无论怎样都不成功,具体步骤是创建 pagefile.sys 文件,然后修改注册表(两处都改了):
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management", "DisablePagingExecutive", "REG_DWORD", "dword:00000000") ;允许虚拟内存
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "DisablePagingExecutive", "REG_DWORD", "dword:00000000") ;允许虚拟内存
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Memory Management", "PagingFiles", "REG_MULTI_SZ", "c:\pagefile.sys 192 256") ;设置具体值
RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management", "PagingFiles", "REG_MULTI_SZ", "c:\pagefile.sys 192 256") ;设置具体值
RunWait(@ComSpec & " /c " & 'gpupdate /force', "", @SW_HIDE) ;刷新组策略
结果是 pagefile.sys 的大小总是显示 0 KB,我的电脑属性里仍然是禁用虚拟内存,不知错在哪里,请大师赐教,谢谢! |
|