Jump to content

Recommended Posts

Posted

I'm having a strange problem with a Windows Server 2003 build. I'm running the following command in a batch (cmd) file:

REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v PagingFiles /t REG_MULTI_SZ /d "c:\pagefile.sys 2560 2560\0d:\pagefile.sys 2560 2560" /f >nul

I want two paging files - C:\pagefile.sys and D:\pagefile.sys. I want them both to be 2.5GB each and I don't want them to grow beyond that. Seems pretty reasonable to me.

During the build, the OS automatically creates a pagefile.sys with min/max values of 2046 and 4092.

I'm having trouble reproducing this problem and determining what exactly is happening, but basically no pagefile gets created on C:\. If I go through the GUI to set the virtual memory settings, it all looks good. If I simply click 'Set' again (without changing anything), after a reboot both pagefiles exist and are the correct size.

It's like direct manipulation of the registry doesn't "take" properly and something else is going on when you do it via the GUI.

Any ideas? I'm still troubleshooting it, but I want to avoid a 2nd reboot during the build just to get the virtual memory settings right.

cheers.


Posted

You should be able to set the reg key from cmdlines.txt so that the reboot after program installs (RunOnceEx, GuiRunOnce) fixes it. I'm going to do some quick testing to see if i can get it to work on my machine.

Posted
It's like direct manipulation of the registry doesn't "take" properly and something else is going on when you do it via the GUI.

Exactly!

The registry/INF method of doing it, is half-broken and needs lot of pre-conditions to be met, as the above posts prove.

The correct way recommended by Microsoft is here - LINK.

That's what we use for local configuration, conf. over network, etc. - and it hasn't ever failed. Moreover, its just a simple one line command (which MS has facilitated by providing the VBS file there by default).

Posted

cheers prathapml! I did a lot of digging and not once did I stumble across pagefileconfig.vbs. I will switch to using that and see what happens.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...