This article helps you use the Inbox Repair Tool
(Scanpst.exe) to recover folders and items from a corrupted Personal Folders
(.pst) file or offline folder (.ost) file in Microsoft Outlook 2002, Outlook
2003, and Outlook 2007. Scanpst.exe is a hidden file that is installed
automatically when you install Windows.
If you are interested, this
article also describes what the tool does and how the tool validates and
corrects errors in the .pst or .ost file. See the "More Information" section.
However, this supplemental information is not required to use the Inbox Repair
tool.
This content is designed for an intermediate computer user,
unless otherwise stated.
To recover folders and items from your corrupted .pst or .ost
file, you have to do the following:
Run the inbox repair tool. For more information, go to
"Step 1: Run the Inbox Repair Tool to diagnose and repair errors" section.
Recover the repaired items. For more information, go to the
"Step 2: Recover the repaired items" section.
Optionally, you can try to recover additional repaired
items from the backup personal folder. For more information, go to the "Step 3:
Recover repaired items from the backup file" section.
Note The examples in the following sections show how to use the Inbox
Repair Tool on a .pst file. However, you can use the same procedures for an
offline folder (.ost) file.
Step 1: Run the Inbox Repair Tool to diagnose and repair errors
To recover your data, you must first run the Inbox Repair
Tool.
Note If you are using Outlook 2002 or if you are using a .pst file in
Outlook 2003 that was created in an earlier version, the Inbox Repair Tool may
not work if your .pst file has approached the 2-GB size limit. Therefore, check
the file size before you continue. Depending on your Windows version, your .pst
file might be located in one of the following folders.
Windows Vista: disk
drive:\users\username\AppData\Local\Microsoft\Outlook
Windows XP and Windows 2000: disk drive:\Documents and
Settings\username\Local Settings\Application
Data\Microsoft\Outlook
If the file has approached the 2-GB size
limit, you can use the PST/OST cropping tool to make the file
smaller. For more information about
the PST/OST cropping tool, click the following article number to view the
article in the Microsoft Knowledge Base:
296088
(http://support.microsoft.com/kb/296088/
)
Oversized PST and OST Crop tool
To run the Inbox Repair Tool, follow these steps:
Exit Outlook.
Make sure that the Show hidden files and
folders option is enabled in your folder options. The Scanpst.exe is a
hidden file on your computer, and you might be unable to locate it if this
setting is not enabled. To check this setting, follow these steps:
a. Click Start, and then click
Run.
Note If you are using Windows Vista, use the Start
Search box.
Type Control Folders, and then
click OK.
Note If you are using Windows Vista, right-click Control
Folders, and then click Run as
administrator.
If you are using Windows Vista, double-click
Folder Options.
Click the View tab.
Under Hidden files and folders, make
sure the Show hidden files and folders option is selected, and
then click OK.
Click Start, and then click
Find or Search, depending on which version of
Windows that you are running.
In the search box, type Scanpst.exe.
If you cannot find the Scanpst.exe file by using Find or Search,
try to locate the file manually. Check the following locations for the file.
Where the file is located depends on which version of Windows you are using:
disk drive:\Program
Files\Microsoft Office\OFFICE12
disk drive:\Program
Files\Common Files\System\Mapi\1033\
disk drive:\Program
Files\Common Files\System\Mapi\1033\NT
disk drive:\Program
Files\Common Files\System\MSMAPI\1033
disk drive:\Program
Files(x86)\Microsoft Office\Office12
disk drive:\Program
Files(x86)\Common Files\System\Mapi\1033\
disk drive:\Program
Files(x86)\Common Files\System\MSMAPI\1033
Double-click the Scanpst.exe file to open the program.
Click Browse to locate the .pst file.
Windows 98 or Windows Me: disk drive\Windows\ Local
Settings\Application Data
Windows NT 4.0: disk
drive\WINNT\Profiles\username\Local
Settings\Application Data
Windows XP or Windows Server 2003: disk drive:\Documents and
Settings\username\Local Settings\Application
Data\Microsoft\Outlook
Windows Vista: disk disk
drive:\users\username\AppData\Local\Microsoft\Outlook
Note If your operating system is not listed or if you cannot find the
file, see the Help provided with Outlook.
Click Start. The Inbox Repair Tool scans
the file and reports whether it found any errors.
Click OK.
After you run the Inbox Repair Tool and restart Outlook, you
should see a list of recovered folders in the left navigation pane in Outlook.
The next step is to move the recovered items to a new Personal Folders (.pst)
file in your profile. To do this, go to "Step 2: Recover the repaired items."
Step 2: Recover the repaired items
Now that you have run the Inbox Repair Tool, you are ready to
recover the repaired items. To start, create a new Personal Folders (.pst) file
entry in your profile. Then, you can move the recovered items to your new
Personal Folders (.pst) file.
After you run the Inbox Repair Tool, start Outlook. If you
use multiple profiles in Outlook, make sure that you select the profile that
contains the Personal Folders (.pst) file that you tried to repair.
On the View or Go menu,
click Folder List to turn on the Folder List view.
In your Folder List, you should see the following
recovered folders:
Recovered Personal Folders
Calendar
Contacts
Deleted Items
Inbox
Journal
Notes
Outbox
Sent Items
Tasks
These recovered folders are usually empty because this is a
rebuilt .pst file. You should also see a folder named Lost and Found. This folder contains folders and items that the Inbox Repair
Tool recovered. Unfortunately, items that are missing from the Lost and Found
folder may be beyond repair.
Create a new Personal Folder (.pst) file in your profile.
The steps may be different, depending on which version of Outlook you are
running.
Outlook 2002
On the File menu, point to
New, and then click Personal Folders File
(.pst).
Click Create to open the
Create Microsoft Personal Folders dialog box.
Enter a file name for your new Personal Folders (.pst)
file, and then click OK.
You should have a new Personal Folders (.pst) file in
your profile.
Outlook 2003
On the File menu, point to
New, and then click Outlook Data
File.
Click OK to open the Create
or Open Outlook Data File dialog box.
Enter a file name for your new Personal Folders (.pst)
file, and then click OK to open the Create Microsoft
Personal Folders dialog box.
Enter a file name for your new Personal Folders (.pst)
file, and then click OK.
You should have a new Personal Folders (.pst) file in
your profile.
Outlook 2007
On the File menu, click Data
File Management.
Click Add to open the New
Outlook Data File dialog box.
In the Types of storage dialog box,
click to select Office Outlook Personal Folders File (.pst),
and then click OK.
In the Create or Open Outlook Data
File dialog box, select the location and a file name for your new
Personal Folders (.pst) file, and then click OK.
Click OK.
You should have a new Personal Folders (.pst) file in
your profile.
Drag the recovered items from the Lost and Found folder to your new Personal Folders (.pst) file.
When you have finished moving all items, you can remove
the Recovered Personal Folders (.pst) file from your profile. This includes the
Lost and Found folder.
If you are satisfied with the information that you
recovered, you are finished. However, if you want to try to recover additional
information, go to "Step 3: Recover repaired items from the backup
file."
Step 3: Recover repaired items from the backup file
Note If you could not open your original Personal Folders (.pst) file
before you ran Inbox Repair Tool, the following procedures may not work. If it
does not work, then unfortunately, you will be unable to recover any additional
information. If you could open the file, the following procedure may help you
recover additional items from your damaged Personal Folders (.pst) file.
When you run Inbox Repair Tool, the option to create a backup of the
original Personal Folders (.pst) file is automatically selected. This option
creates a file on your hard disk that is named "File
name.bak" (without quotation marks). This file is a copy of the
original File name.pst file with a different
extension. If, after Step 2, you think that you are still missing items, you
can try to recover additional information from this backup file by following
these steps:
Locate the .bak file. It is located in the folder of
your original Personal Folders (.pst) file.
Locate the .bak file. It is located in the folder of your
original Personal Folders (.pst) file.
Make a copy of the .bak file and give the file a new name
with a .pst extension. For example, name the file "New
name.pst" (without quotation marks).
Import the New name.pst file
that you created in the previous step by using the Import and Export Wizard in
Outlook. To do this, follow these steps:
On the File menu, click
Import and Export.
Click Import from another program or
file, and then click Next.
Click to select Personal Folder File
(.pst), and then click Next.
Under File to import, click
Browse, and then double-click your Newname.pst file.
Under Options, click Do not
import duplicates, and then click Next.
Under Select the folder to import
from, click to select the Personal Folders (.pst) file, and then click
to select Include subfolders.
Click to select Import folders into the same
folder in, and then select your new Personal Folders (.pst).
Click Finish.
Note Remember that the backup file was the original corrupted file,
and you may find that you cannot recover anything other than what was recovered
in the Lost and Found folder. If you cannot import the Newname.pst file into
Outlook, unfortunately you have lost all the information that is not in the
Lost and Found folder.
For those who are interested, this section describes exactly
what the Inbox Repair tool does and how the tool validates and corrects errors
in the .pst or .ost file.
When you run the Inbox Repair Tool on a Personal Folders (.pst)
file, it does the following:
The Inbox Repair Tool analyses the Personal Folders (.pst)
file directory structure and item headers to try to recover all folders and
items.
If the Inbox Repair Tool recovers the Personal Folders
(.pst) file, it means that the repair tool found problems, and repaired what it
could.
The Inbox Repair Tool tries to turn any file into a
Personal Folders (.pst) file. For example, if you rename an executable file to
"Something.pst" (without quotation marks), the tool
changes the file to a mountable .pst file.
The Inbox Repair Tool makes a backup copy of any Personal
Folders (.pst) file before trying to repair the file.
How the Inbox Repair Tool validates and corrects errors
ScanPST mostly validates and corrects errors in the internal data
structures of a .pst file. The .pst file is a database file. Therefore,
structures, such as BTrees and reference counts, are checked and repaired as
necessary. These low-level objects have no knowledge of the upper-level
structures, such as messages, calendar items, and so on, that are built upon
them.
If ScanPST determines that a specific block of the structure or
table is unreadable or corrupted, ScanPST removes it. If that block was part of
a specific item in Outlook, the item will be removed when it is validated.
You may not expect this behavior. However, the removal of the item is
appropriate given the circumstances. Also, this specific kind of situation is
probably very rare, and it will always be entered in the ScanPST log file.
At a higher level, the more visible changes that you see involve
folders and messages.
Folders
ScanPST examines every folder in the .pst and performs the
following operations:
ScanPST makes sure that there are the correct tables
associated with the folder.
ScanPST checks every row in each table and makes sure that
the message or the subfolder exists in the system.
If ScanPST cannot find the message or the subfolder,
ScanPST removes the row from the table.
If ScanPST does find the message or the subfolder, ScanPST
validates the message or the folder.
If that validation fails, the message or folder is
considered corrupted, and it is removed from the table and deleted from the
database.
If the validation succeeds, ScanPST does another analysis
to make sure that the now-recovered message values are consistent with the
values in the table. Corrupted folders are recreated from scratch, if
necessary. These folders contain no user data.
Messages
Most users will be concerned by message operations, because a
corrupted item is likely to cause something to be deleted from the .pst file.
ScanPST performs the following operations on messages:
ScanPST does some basic validation of attachment tables and
recipient tables. This operation resembles how a folder works with the messages
in it.
As soon as the recipient table is validated to guarantee
correctly formatted recipients, ScanPST makes any changes that are required to
synchronize these valid recipient table contents to the recipient properties on
the message. ScanPST also guarantees that the message's parent folder refers to
a valid folder. The following message properties are checked to make sure that
they follow valid data formats:
PR_MESSAGE_CLASS
ScanPST checks that this
property exists. If the property does not exist, it is set to IPM.Note.
PR_MESSAGE_FLAGS
Each flag is validated
separately.
PR_SUBMIT_FLAGS
This validation resembles the
operation for message flags.
PR_CLIENT_SUBMIT_TIME
If the submit flags
indicate that the message is marked as submitted, this property must exist. If
not, the time is set to Now.
PR_SEARCH_KEY
This property must exist. If the
property is not present, a random GUID is generated for it.
PR_CREATION_TIME
This property must exist. If
the property is not present, the time is set to Now.
PR_LAST_MODIFICATION_TIME
This property must
exist. If the property is not present, the time is set to Now.
PR_MESSAGE_SIZE
Sizes are recalculated and
compared to stored values. If sizes differ by some delta, the calculated value
is written.
No validation is explicitly done on body-related properties
or on subject-related properties, except the implicit low-level validation that
this article discusses earlier. The recipient display properties are modified
to be consistent with the recovered recipient table. As soon as this operation
is complete, other algorithms are run to collect all the orphaned messages and
to put them in an Orphans folder.
For more information about binary
trees (btrees), visit the following Microsoft Web site: