Deployment Solution

 View Only

VBScript That Will Set the Pagefile Size 

Jan 02, 2009 04:03 PM

Here is a VBScript that we use to set the pagefile on desktop/laptop systems when we are building them in Deployment Solution.

This will figure out the amount of physical RAM in the system, then set the initial and maximum size to 1.5 times the physical RAM. It will set a maximum of 4gb. It doesn't change the drive that contains the page file since this is specifically directed toward our desktop/laptop systems.

Download the VBScript.txt and save it as setpagefile.vbs to a share on your network, then create a job in Deployment Solution to run the VBScript following these screen shots.

Right click on job folder to create a “New Job”

Add a “Run Script” task to the job

Type the location of the VBScript in “Run the script from file:”

You may have to specify a user that has rights to the share

Click Finish

Add a reboot (Power Control) for this to take effect

Select Restart (we always select force applications…) and click finish.

The result should be a job with two tasks.

License:AJSL
By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License
Support:User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab.

Statistics
0 Favorited
0 Views
19 Files
0 Shares
0 Downloads
Attachment(s)
jpg file
7321.jpg   2 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-01.jpg   49 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-01_0.jpg   9 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-02.jpg   60 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-02_0.jpg   13 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-03.jpg   51 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-03_0.jpg   10 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-04.jpg   80 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-04_0.jpg   14 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-05.jpg   54 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-05_0.jpg   10 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-06.jpg   26 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-06_0.jpg   23 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-07.jpg   38 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-07_0.jpg   8 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-08.jpg   42 KB   1 version
Uploaded - Feb 25, 2020
jpg file
7321-08_0.jpg   9 KB   1 version
Uploaded - Feb 25, 2020
doc file
createjobforpagefilevbs.doc   788 KB   1 version
Uploaded - Feb 25, 2020
txt file
setpagefile.txt   859 B   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

Oct 04, 2011 10:30 AM

Hi pcalver,

 

The attached vbscript works perfectly on Windows XP. However, it fails on Windows 7.

Is there any other script that will work on Windows 7?

Thanks!

Aug 07, 2009 08:10 AM

FYI - If you use the same script and just set both Min and Max to 0, it will set the pagefile to Syetem Managed in Server 2003.

Mar 26, 2009 12:27 PM

Here is an exert from an article I found.  There are a many more out there like it.  This is also what I learned when I got my MSCE a long time ago.

Make its initial size as big as the maximum size. Although this will cause the Pagefile to occupy more HD space, we do not want it to start off small, then having to constantly grow on the HD. Writing large files (and the Pagefile is indeed large) to the HD will cause a lot of disk activity that will cause performance degradation. Also, since the Pagefile only grows in increments, you will probably cause Pagefile fragmentation, adding more overhead to the already stressed HD.

System managed does the following:
...minimum size is equivalent to 1.5 times the amount of RAM on your system, and 3 times that figure for the maximum size.

Mar 16, 2009 12:05 PM

Why not just set the control of the page file to system managed? This will then set the size of the page file AUTOMATICALLY to 1.5 times the installed RAM, and the figure will automatically change if you add or remove RAM in the future. The following regkey sets the page file size to system managed:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management]
"PagingFiles"=hex(7):43,00,3a,00,5c,00,70,00,61,00,67,00,65,00,66,00,69,00,6c,\
  00,65,00,2e,00,73,00,79,00,73,00,20,00,30,00,20,00,30,00,00,00,00,00

Related Entries and Links

No Related Resource entered.