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, colSWbemObjectSet Dim objSWbemObject, SystemRAM, objPageFile strComputer = "." 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 / 1000 Next For Each objPageFile In colPageFile objPageFile.InitialSize = 1.5 * SystemRAM objPageFile.MaximumSize = 1.5 * SystemRAM objPageFile.Put_ Next 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.