Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to set the Windows pagefile size in an answer file? The Windows Automated Installation Kit (WAIK) Unattended Windows Setup Reference shows that the pagefile for the windowsPE pass of setup can be set, but that this setting does not affect the pagefile of the Windows operating system.

I'm asking because I have a 16 GB RAM server with a 64GB system drive consisting of 2x64 GB SSDs in a RAID 1 array. The default pagefile that Windows creates for this kind of system is 16GB, so it takes up a lot of the system drive capacity. I think an 4 GB pagefile is sufficient for a kernel memory dump, so I would like to set that for the pagefile size. I know I can do this after Windows setup completes, but if it can be done at 4 GB from the beginning it might result in less fragmentation that if it is resized.

share|improve this question

Probably not the answer you're looking for, but regarding modifying anything to do with a page file, have a look at the accepted answer to this question.

share|improve this answer

As far as I know, there are no provisioning in answer file to do it. Answer file contains only settings that you get asked during setup. Page file is not one of them.

share|improve this answer

Here is a work around from Microsoft owned sysinternals:

"PageDefrag uses advanced techniques to provide you what commercial defragmenters cannot: the ability for you to see how fragmented your paging files and Registry hives are, and to defragment them. In addition, it defragments event log files and Windows 2000/XP hibernation files (where system memory is saved when you hibernate a laptop)."

share|improve this answer
+1 for PageDefrag. I expect it will eventually become part of Windows itself. – John Gardeniers Aug 26 '09 at 8:27
-1 this answer is not only irrelevant to the question (what does PageDefrag have to do with setting pagesize at installation time via answer file?), it is outright detrimental: defragmenting an SSD is pointless at best (what is the seek latency on an SSD?), and detrimental to SSD health (lifespan measured in "write" cycles) in most cases. Also see Fragging wonderful: The truth about defragging your SSD at PCWorld. – vladr Jul 8 '14 at 14:03

SSDs certainly bring less latency to the table but you are probably going to introduce more fragmentation by reducing the size of the swap file since the MRU pages will constantly be changing. Read the accepted answer that farseeker pointed to (It's actually correct and informative) then decide whether or not you want to resize.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.