Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to verify the Page File location using a script

Author: Nirmal Sharma MVP

View products that this article applies to.


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

↑ Back to the top

More information

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


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


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.

↑ Back to the top

Community solutions content disclaimer

Microsoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.

↑ Back to the top

Keywords: KB556020, kbhowto, kbpubtypecca, kbpubmvp

↑ Back to the top

Article Info
Article ID : 556020
Revision : 1
Created on : 9/26/2007
Published on : 9/26/2007
Exists online : False
Views : 344