How to verify the Page File location through a script:

The following knowledgebase will explain the methods you can use to check the Location of Page File on local and remote computer.

To check on local computer:

You can use the following methods:

  1. Connecting to Remote Registry Service
  2. Using a script

The first method is easy but includes a lot of efforts. You can navigate to the following location in registry after connecting to remote registry:

HKLM\System\CurrentControlSet\Control\Session Manager\Memory Management

The above registry key includes the following values in right pane:

pagingfiles REG_MULTI_SZ c:\pagefile.sys 3131 3131\0\0

To check on a Remote Computer:

You can use the below script to check the Paging File location on a remote computer:

@echo off

Srvlist=C:\Temp\Srvlist.txt

Echo Computer Name, Paging File Location >> Result.csv

SET PF_Loc=

For /F “Tokens=*” %%a In (%srvlist%) Do (

Set Comp_name=%%a

Set RegQry=”\\%%a\HKLM\system\currentcontrolset\control\session manager\Memory management /v pagingfiles

REG.exe Query %RegQry% > CheckCC.txt

FOR /f “Tokens=3” %%b in (CheckCC.txt) Do SET PF_Loc=%%b

Echo %Comp_name, %PF_Loc% >> Result.csv

)

The above script will check remote computer for one registry entry for Paging File location and the results will be saved in a CSV format file.

Comments

# re: How to verify the Page File location through a script:

Tuesday, November 06, 2007 10:34 AM by noor

how do you read the pagefile content from a local computer.

Thanks

# re: How to verify the Page File location through a script:

Tuesday, November 06, 2007 10:34 AM by noor

how do you read the pagefile content from a local computer.

Thanks

# re: How to verify the Page File location through a script:

Tuesday, August 19, 2008 5:36 AM by Nirmal Sharma

Not possible, Microsoft can help you I believe :)

Leave a Comment

(required) 
(required) 
(optional)
(required)