<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Opindian &#187; repair</title>
	<atom:link href="http://opindian.com/blog/tag/repair/feed/" rel="self" type="application/rss+xml" />
	<link>http://opindian.com/blog</link>
	<description>One Indian&#039;s Opinion</description>
	<lastBuildDate>Sun, 04 Jul 2010 22:39:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1-beta</generator>
		<item>
		<title>Automating Outlook&#8217;s Inbox Repair Tool (ScanPST)</title>
		<link>http://opindian.com/blog/2008/09/02/automating-outlooks-inbox-repair-tool-scanpst/</link>
		<comments>http://opindian.com/blog/2008/09/02/automating-outlooks-inbox-repair-tool-scanpst/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 15:12:41 +0000</pubDate>
		<dc:creator>Anish</dc:creator>
				<category><![CDATA[software]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[repair]]></category>
		<category><![CDATA[tweaks]]></category>

		<guid isPermaLink="false">http://opindian.com/blog/?p=236</guid>
		<description><![CDATA[Update: This has been tested in Outlook 2010, 2007 &#38; 2003 I find that Outlook&#8217;s Personal Folder (.pst) files have a haphazard way of getting corrupted &#8211; which obviously impacts daily performance as well as reliability of my email achieve. Microsoft&#8217;s Inbox Repair Tool (ScanPST) diagnoses and repairs corrupt .pst/.ost files to make sure the [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" title="File-Schedule" src="http://opindian.com/blog//home/ahpatel/public_html/blog/wp-content/uploads/HLIC/www.opindian.com/blog/wp-content/uploads/FileSchedule_thumb.jpg" border="0" alt="File-Schedule " width="120" height="120" align="right" /></p>
<p><strong>Update: This has been tested in Outlook 2010, 2007 &amp; 2003</strong></p>
<p>I find that Outlook&#8217;s Personal Folder (.pst) files have a haphazard way of getting corrupted &#8211; which obviously impacts daily performance as well as reliability of my email achieve. Microsoft&#8217;s <a href="http://support.microsoft.com/kb/287497">Inbox Repair Tool</a> (ScanPST) diagnoses and repairs corrupt .pst/.ost files to make sure the file structure is intact, but the process requires more manual intervention than I care for.  <strong>So, here&#8217;s how I made Outlook&#8217;s Inbox Repair process completely automated:</strong></p>
<p><strong>Step 1:</strong> Download some 3rd party utilities!</p>
<ol>
<li><strong>Download </strong><a href="http://www.nirsoft.net/utils/nircmd.zip"><strong>NirCmd.zip</strong></a>.<br />
In order to run the ScanPST utility against your .pst/.ost files, Outlook must be shutdown. While there isn&#8217;t a way to do what we need natively in Windows, <a href="http://www.nirsoft.net/utils/nircmd.html">NirCmd</a> (free) allows us to accomplish the task gracefully &#8211; meaning Outlook will not shut down when unsaved content exists (in which case the Repair will be skipped for this instance).<br />
(Note: <em>If you prefer to forcefully end Outlook, you can do so using process.exe </em><sup>1</sup> . <em>Of course, doing this could cause corruption &#8211; which is what we&#8217;re trying to avoid/fix!)</em></li>
<li><strong>Extract nircmdc.exe</strong><sup>2</sup> to &#8216;C:\\Windows\System32&#8242;.<br />
<em>(Note: I don&#8217;t usually like to install 3rd party executables to WindowsSystem32. In this case, however, I feel these simple cli utilities don&#8217;t justify additions to my Path entry. </em>If you wish to install somewhere else, you can add the location to your Path<sup>3</sup> or add the full path into the script file.)</li>
<li><strong>Download </strong><a href="http://www.olfolders.de/Lang/German/OLfix/cmdscan.zip">cmdscan.zip</a>.<br />
<a href="http://www.olfolders.de/Lang/English/company.htm">Quester</a>&#8216;s cmdscan (free) allows us to run ScanPST without any user interaction.</li>
<li><strong>Extract cmdscan.exe</strong> to &#8216;C:\\Windows\System32&#8242;</li>
<li><strong>Download <a href="http://opindian.com/blog/wp-content/uploads/autopst.bat">autopst.bat</a></strong> &#8211; my batch file template.</li>
</ol>
<p>The next Steps will outline what is happening in the batch file:</p>
<p><strong>Step 2:</strong> Make sure Outlook is not running/Close Outlook if it is.</p>
<ol>
<li>(informational) To gracefully close outlook, the script executes:<em><strong><br />
nircmdc closeprocess outlook.exe. </strong><br />
To <strong>test</strong> your nircmd install, </em><strong>open Outlook and execute this command</strong> from the command prompt<em>.</em></li>
<li>(informational) We want to wait for Outlook to close because the Repair Tool will not analyze/fix an open .pst file. To do this, the script executes:<br />
<em><strong> nircmdc waitprocess outlook.exe.</strong></em></li>
</ol>
<p><strong>Step 3: </strong>Run ScanPST from the Command Line.</p>
<ol>
<li><strong>Find the path to scanpst.exe</strong> on your computer:
<ol>
<li>in Outlook 2003 &#8211; C:\\Program Files\Common Files\System\Mapi\1033\</li>
<li>in Outlook 2007 &#8211; C:\Program Files\Microsoft Office\Office12\</li>
</ol>
</li>
<li><strong>Edit autopst.bat</strong> in notepad and <strong>verify ScanPST-location=&#8221;<em>&lt;your path&gt;&#8221;</em></strong></li>
<li>If your .pst/.ost files are in the default location, the command in the script &#8211; <strong>cmdscan %ScanPST-location% *.pst *.ost &#8211; </strong>will work just fine. (Otherwise, follow the instructions in readme.txt, found in the cmdscan.zip file. It will show all your file selection options).</li>
</ol>
<p><strong>Step 4: </strong>(optional) Open Outlook so it&#8217;s ready to go when you access your computer again.</p>
<ol>
<li>If you prefer to automatically restart Outlook after the scan, remove &#8220;REM&#8221; from the front of the &#8220;REM start outlook.exe&#8221; line.</li>
</ol>
<p><strong>Step 5:</strong> Create a Scheduled TaskÃ‚Â <sup>4</sup></p>
<ol>
<li>Start -&gt; Programs -&gt; Accessories -&gt; System Tools -&gt; <strong>Scheduled Tasks.</strong></li>
<li>Next -&gt; Browse&#8230; -&gt; <strong>select the autopst.bat file</strong> -&gt; Next</li>
<li><strong>Select task frequency</strong> (i.e., Daily/Weekly) -&gt; Next</li>
<li><strong>Set run time </strong>(when are you least likely to need Outlook open?</li>
<li>&#8230;you get the idea&#8230;</li>
</ol>
<p><strong>Step 6</strong>: Test</p>
<ol>
<li>Double-click on the autopst.bat file or execute the newly created task to make sure things go as expected.</li>
</ol>
<ol class="footnotes"><li id="footnote_0_236" class="footnote"><a title="http://www.beyondlogic.org/solutions/processutil/processutil.htm" href="http://www.beyondlogic.org/solutions/processutil/processutil.htm">Command Line Process Viewer/Killer/Suspender</a> &#8211; This method first tried to gracefully shut down Outlook. If Outlook remains open after 60 seconds, the process is forced to terminate.</li><li id="footnote_1_236" class="footnote"><em>nircmdc </em>is a command line only version of <em>nircmd</em> &#8211; this makes popup dialogs print to cmd window instead; thus, allowing us to automate processes more reliably</li><li id="footnote_2_236" class="footnote">How to set the path in: Windows <a title="http://www.computerhope.com/issues/ch000549.htm" href="http://www.computerhope.com/issues/ch000549.htm">XP</a> / <a href="http://banagale.com/changing-your-system-path-in-windows-vista.htm">Vista</a></li><li id="footnote_3_236" class="footnote"><a title="http://support.microsoft.com/kb/308569" href="http://support.microsoft.com/kb/308569">How To Schedule Tasks in Windows XP</a></li></ol>]]></content:encoded>
			<wfw:commentRss>http://opindian.com/blog/2008/09/02/automating-outlooks-inbox-repair-tool-scanpst/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>
