Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page File

Status
Not open for further replies.

Wazz

Technical User
Aug 12, 2002
209
GB
Hi,

Please can someone tell me if there is a way to script windows to manage the page file.
Basically I have numerous models of pc all with different amounts of ram and the page file is set to zero. I made a script to manually set the page file based on the Pc's ram but no one can decide on what figure the manual page file should be, hence to let windows do it automatically.

thanks in advance
 
I use a minimum of 1X my ram to max of 2X my ram, but thats just me. I have a gig of ram, so my page is 1024mb-2048mb. I also have 500GB of HDD space and multiple partitions.
 
Thanks for your reply.
I have opted to script it to 1.5 times the value of the ram for both the min and max. I will just have to see what happens. But the page file is turning into a bit of a pain. Anyone any idea how to turn on the page file or set it to let windows manage it automatically? Surely its just a reg key or two?

Thanks
 
You can use computer management for that and possibly a GPO is you are using Active Directory

See if you can do anything with this code

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colPageFiles = objWMIService.ExecQuery _
("Select * from Win32_PageFileSetting")

For Each objPageFile in colPageFiles
objPageFile.InitialSize = 300
objPageFile.MaximumSize = 600
objPageFile.Put_
Next

Jake
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top