serverguy78
MIS
Hello I have a page file script that works fine in Windows XP. However it doesn't work at all in Windows 7. Can someone help me?
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 = 2046
objPageFile.MaximumSize = 4092
objPageFile.Put_
Next