May 23, 200521 yr Hi there,Is there a way to adjust virtual memory during an unattended installation, or after with a reg change or some sort?Thanks,JT
May 23, 200521 yr If you are using XP, you can use WMI class.wmic pagefileset setAllowed values to set are InitialSize a MaximumSize, e.g. wmic pagefileset set InitialSize=X, MaximumSize=Y
May 23, 200521 yr I created a setpagefile.vbs file that I call from my unattended install. I can also run the script from my autorun interface. Dim strComputer, objWMIService, objSWbemServices, colPageFile, colSWbemObjectSetDim objSWbemObject, SystemRAM, objPageFilestrComputer = "."Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")Set objSWbemServices = GetObject("winmgmts:\\" & strComputer)Set colPageFile = objWMIService.ExecQuery ("SELECT * FROM Win32_PageFileSetting")Set colSWbemObjectSet = objSWbemServices.InstancesOf("Win32_LogicalMemoryConfiguration")For Each objSWbemObject In colSWbemObjectSet SystemRAM = objSWbemObject.TotalPhysicalMemory / 1000NextFor Each objPageFile In colPageFile objPageFile.InitialSize = 1.5 * SystemRAM objPageFile.MaximumSize = 1.5 * SystemRAM objPageFile.Put_NextYou can change the values, this is that basic script that sets the page file to 1.5 times ram and sets the min and max size the same to make a static swapfile.
July 4, 200521 yr I created a setpagefile.vbs file that I call from my unattended install. I can also run the script from my autorun interface. <code here> You can change the values, this is that basic script that sets the page file to 1.5 times ram and sets the min and max size the same to make a static swapfile.<{POST_SNAPBACK}>Wow, this really works!! Thanks!
July 4, 200521 yr [...]to make a static swapfile. Sorry to nitpick, but Windows does not use a swapfile, and has not since before Windows 95. Although we generally use the terms "swapfile" and "paging file" interchangeably, they are slightly different. Swapfiles swap entire processes from RAM to the file, while paging files only move small parts of programs from RAM to the paging file at a time.Secondly, the old "1.5x" rule for RAM and paging files was always a poor rule. The more RAM you have, generally the smaller paging file you need; the paging file is meant as a poor substitute for the sytem memory. You should choose the size of the paging file based on how much virtual memory is needed when your system is under it's heaviest load. For this reason, I never set the paging file for someone else like you're doing (and if this is for your computer only, then you shouldn't need to calculate the size based on system memory at all). I always give them the option of size, or if you know what kind of usage the computer gets set the paging file at that limit.
July 5, 200521 yr Hiya, I always use a static pagefile, I've got a gig of memory and rarely need much more...anyway, here's the regfile I apply from CMDLINES.TXT at T-12:Windows Registry Editor Version 5.00;set pagefile to 256MB[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]"PagingFiles"=hex(7):43,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\ 00,65,00,2e,00,73,00,79,00,73,00,20,00,32,00,35,00,36,00,20,00,32,00,35,00,\ 36,00,00,00,00,00
Create an account or sign in to comment