How to change page file settings via CMD

With Windows XP there is a script called pagefileconfig.vbs that you can use to manage page file settings. Anyway here you find a script that set pagefile as “System Managed”

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 = 0
 objPageFile.MaximumSize = 0

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s