<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Aaron Margosis' Non-Admin, App-Compat and Sysinternals WebLog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/aaron_margosis/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/feed.xml</link>
    <description>The Non-Admin blog - running with least privilege on the desktop... and then dealing with the application compatibility fallout... and using Sysinternals and other utilities to figure things out</description>
    <lastBuildDate>Wed, 19 Jun 2019 21:35:07 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>My last blog post on this platform</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/my-last-blog-post-on-this-platform</link>
      <pubDate>Wed, 19 Jun 2019 21:25:57 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=665</guid>
      <description><![CDATA[The content on Microsoft's MSDN and TechNet blog platforms will soon become read-only. So, this is...]]></description>
      <content:encoded><![CDATA[The content on Microsoft's MSDN and TechNet blog platforms will soon become read-only. So, this is my last post here, but not my last post anywhere -- here are my forwarding addresses:

My future posts about "AaronLocker," Sysinternals, non-admin tools, and any other topics I have covered or will someday get into will be on the <a target="_blank" href="https://techcommunity.microsoft.com/t5/Windows-IT-Pro-Blog/bg-p/Windows10Blog" rel="noopener">Microsoft IT Pro Blog</a> -- when I begin posting there you should be able to find my contributions by selecting my name in the filter dropdown. You can also <a target="_blank" href="https://techcommunity.microsoft.com/t5/user/viewprofilepage/user-id/171536" rel="noopener">follow me</a> on the Tech Community.

The Security Baselines blog that I contribute to is also moving - to the new <a target="_blank" href="https://techcommunity.microsoft.com/t5/Microsoft-Security-Baselines/bg-p/Microsoft-Security-Baselines" rel="noopener">Microsoft Security Baselines Blog</a>, along with a new <a target="_blank" href="https://techcommunity.microsoft.com/t5/Microsoft-Security-Baselines/bd-p/Security-Baselines" rel="noopener">Microsoft Security Baselines discussion space</a>.]]></content:encoded>
    </item>
    <item>
      <title>"AaronLocker" big perf and feature updates (17 June 2019)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-big-perf-and-feature-updates-17-june-2019</link>
      <pubDate>Mon, 17 Jun 2019 16:03:29 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=655</guid>
      <description><![CDATA[(On the 15th anniversary of my first blog posts...)

Performance improvements in the "AaronLocker"...]]></description>
      <content:encoded><![CDATA[<em>(On the 15th anniversary of my <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2004/06/17/not-running-as-admin/" rel="noopener">first</a> <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2004/06/17/why-you-shouldnt-run-as-admin/" rel="noopener">blog</a> <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2004/06/17/the-easiest-way-to-run-as-non-admin/" rel="noopener">posts</a>...)</em>

Performance improvements in the "AaronLocker" scripts, <em>especially</em> in Get-AppLockerEvents.ps1.

And:

Get-AppLockerEvents.ps1 ...
<ul>
 	<li>Now retrieves Packaged App events;</li>
 	<li>-EventLogNames parameter supports retrieving from named event logs, to support the use case when forwarded events are saved in event logs other than "ForwardedEvents";</li>
 	<li>Removed all the field-omission switches (as part of the perf upgrade)</li>
</ul>
Generate-EventWorkbook.ps1 ...
<ul>
 	<li>No longer requires a saved .csv file; invoke it without parameters and Generate-EventWorkbook.ps1 retrieves events from the local computer and slices/dices the results into a multi-tabbed Excel workbook.</li>
</ul>
Documentation updated, including updated troubleshooting/tips section.

<a target="_blank" href="https://github.com/Microsoft/AaronLocker" rel="noopener">https://github.com/Microsoft/AaronLocker</a>]]></content:encoded>
    </item>
    <item>
      <title>"AaronLocker" updates (22 May 2019)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-updates-22-may-2019</link>
      <pubDate>Wed, 22 May 2019 07:39:04 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=635</guid>
      <description><![CDATA[Always handles Portable Executable files even with non-standard extensions such as .tmp and...]]></description>
      <content:encoded><![CDATA[Always handles Portable Executable files even with non-standard extensions such as .tmp and determines whether it's an EXE or DLL. (Ignores files with extensions that should never be PE files such as .txt).

Ignores .js files by default; switches on scripts enable overriding to build rules for .js. (AppLocker enforced on .js files only through Windows Script Host; most .js files are processed by other tools that do not enforce AppLocker rules).

Added -SearchNonDefaultRootDirs to Scan-Directories.ps1; makes it quicker to identify files that might need AppLocker rule customization.

Improved optimization to lead to more publisher rules and fewer hash rules, where possible.

Documentation updated.

Download here: <a href="https://github.com/Microsoft/AaronLocker">AaronLocker</a>]]></content:encoded>
    </item>
    <item>
      <title>“AaronLocker” updates (13 May 2019)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-updates-13-may-2019</link>
      <pubDate>Tue, 14 May 2019 03:21:56 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=615</guid>
      <description><![CDATA[Hot on the heels of yesterday's changes, "AaronLocker" now handles EXE and DLL files with...]]></description>
      <content:encoded><![CDATA[Hot on the heels of <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2019/05/12/aaronlocker-updates-12-may-2019/" rel="noopener">yesterday's changes</a>, "AaronLocker" now handles EXE and DLL files with non-standard extensions. Scan a directory with, say, "*.pyd" files or "*.api" files or any other non-standard extension, the "AaronLocker" scripts now identify them, distinguish whether they are Win32 EXE or DLL rules, and builds rules to cover them.

Reminders of "AaronLocker" resources:

7 minute "Intro to 'AaronLocker:'"
<a target="_blank" href="https://youtu.be/nQyODwPR5qo" rel="noopener">https://youtu.be/nQyODwPR5qo</a>

13 minute "AaronLocker Quick Start" - how to build, customize, and deploy robust and practical AppLocker rules quickly using AaronLocker:
<a target="_blank" href="https://youtu.be/E-IrqFtJOKU" rel="noopener">https://youtu.be/E-IrqFtJOKU</a>

All scripts and full documentation on GitHub:
<a target="_blank" href="https://github.com/Microsoft/AaronLocker" rel="noopener">https://github.com/Microsoft/AaronLocker</a>

Blog posts:
<a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/tag/aaronlocker/" rel="noopener">https://blogs.msdn.microsoft.com/aaron_margosis/tag/aaronlocker/</a>]]></content:encoded>
    </item>
    <item>
      <title>"AaronLocker" updates (12 May 2019)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-updates-12-may-2019</link>
      <pubDate>Sun, 12 May 2019 05:17:33 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=605</guid>
      <description><![CDATA[Just committed some changes to the "AaronLocker" repo on GitHub and its documentation. Changes...]]></description>
      <content:encoded><![CDATA[Just committed some changes to the <a target="_blank" href="https://github.com/Microsoft/AaronLocker" rel="noopener">"AaronLocker" repo on GitHub</a> and <a target="_blank" href="https://github.com/microsoft/AaronLocker/blob/master/Documentation/AaronLocker.docx" rel="noopener">its documentation</a>. Changes include:

Rule-generation for files in unsafe paths: always used to create one publisher or hash rule for each file in the directory hierarchy. New granularity options enable rules tied only to publisher name or publisher+product name instead of one-rule-per-file. Can dramatically reduce the number of rules generated, and increases flexibility/resilience when product updates might introduce new files and reduce the likelihood that the AppLocker rules also need to be updated. See <a target="_blank" href="https://github.com/microsoft/AaronLocker/blob/master/Documentation/AaronLocker.docx" rel="noopener">the documentation</a> for details, as well as the special handling for Microsoft-signed files.

UnsafePaths... - called out in rule name and description when hash rule is created for a signed file that doesn't have version information needed for a publisher rule;
Used new lower-granularity rules for provided OneDrive XML rules; dramatically reduces number of rules required.
Small difference in inert timestamp rule so that Compare-Policies shows it as a rule change instead of an added rule + a deleted rule
Scan-Directories.ps1 - fixed bug in -SearchAllUsersProfiles
Scan-Directories.ps1 also outputs BinaryName and BinaryVersion
Exe files to blacklist: added Microsoft.Workflow.Compiler.exe]]></content:encoded>
    </item>
    <item>
      <title>"AaronLocker" videos on YouTube</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-videos-on-youtube</link>
      <pubDate>Fri, 22 Feb 2019 18:36:36 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=585</guid>
      <description><![CDATA[7 minute "Intro to 'AaronLocker'," a set of PowerShell scripts that automate AppLocker-related tasks...]]></description>
      <content:encoded><![CDATA[7 minute "Intro to 'AaronLocker'," a set of PowerShell scripts that automate AppLocker-related tasks to achieve robust, practical, customizable, and maintainable application whitelisting for Windows.  <a href="https://youtu.be/nQyODwPR5qo">https://youtu.be/nQyODwPR5qo</a>

13 minute "AaronLocker Quick Start:" how to build, customize, and deploy robust and practical AppLocker rules quickly using AaronLocker. <a href="https://youtu.be/E-IrqFtJOKU">https://youtu.be/E-IrqFtJOKU</a>]]></content:encoded>
    </item>
    <item>
      <title>"AaronLocker" moved to GitHub</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-moved-to-github</link>
      <pubDate>Mon, 28 Jan 2019 19:58:46 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=555</guid>
      <description><![CDATA["AaronLocker" is a robust, practical, and free PowerShell-based application whitelisting solution...]]></description>
      <content:encoded><![CDATA[<span>"AaronLocker" is a robust, practical, <em>and free</em> PowerShell-based application whitelisting solution for Windows, built on Windows AppLocker. Earlier posts with description <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2018/06/26/announcing-application-whitelisting-with-aaronlocker/" rel="noopener">here</a> and <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2018/10/11/aaronlocker-update-v0-91-and-see-aaronlocker-in-action-on-channel-9/" rel="noopener">here</a>.</span>

Rather than continuing to attach zip files to blog posts, I have moved the "AaronLocker" materials, including scripts and documentation, to GitHub: <a target="_blank" href="https://github.com/Microsoft/AaronLocker" rel="noopener">https://github.com/Microsoft/AaronLocker</a>. Among other things, this will make it easier to upload changes as I make them rather than building up a whole package first. I'll continue to post here to announce significant changes, but the materials now have a permanent home instead of whatever the latest blog post URL is.

Changes since the previous version include:
<ul>
 	<li>The generated rule set now includes an inoperative rule that contains the date and time the rule set was generated to help differentiate policy versions, and to associate an in-use policy with a policy rule file with the same timestamp in its filename. You can retrieve this time stamp from the policy even after it has been imported into Group Policy:
<a href="https://msdnshared.blob.core.windows.net/media/2019/01/AaronLockerTimestamp.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/01/AaronLockerTimestamp-300x41.png" alt="" width="300" height="41" class="alignnone size-medium wp-image-565" /></a></li>
 	<li>Added Get-AaronLockerTimestamp.ps1 to retrieve the generated timestamp from local policy, effective policy, or a saved policy XML file.</li>
 	<li>Added DownloadAccesschk.ps1 to download the current version of AccessChk.exe from Sysinternals.</li>
 	<li>Improvements to the workbook produced by Generate-EventWorkbook.ps1 (three user-focused tabs).</li>
 	<li>Added -Objects switch to Get-AppLockerEvents.ps1 to output PSCustomObjects instead of CSV.</li>
 	<li>Scan-Directories.ps1 produces more data, recognizes additional “default” root directories.</li>
</ul>
<a target="_blank" href="https://github.com/Microsoft/AaronLocker/blob/master/Documentation/AaronLocker.docx" rel="noopener">AaronLocker.docx</a> is also on GitHub and explains everything in detail.]]></content:encoded>
    </item>
    <item>
      <title>"AaronLocker" update (v0.91) -- and see "AaronLocker" in action on Channel 9!</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/aaronlocker-update-v0-91-and-see-aaronlocker-in-action-on-channel-9</link>
      <pubDate>Thu, 11 Oct 2018 22:52:23 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=535</guid>
      <description><![CDATA["AaronLocker" is a robust, practical, PowerShell-based application whitelisting solution for...]]></description>
      <content:encoded><![CDATA["AaronLocker" is a robust, practical, PowerShell-based application whitelisting solution for Windows. See it in action in <a target="_blank" href="https://channel9.msdn.com/Shows/Defrag-Tools/Defrag-Tools-198-AaronLocker" rel="noopener"><strong>this new Defrag Tools episode on Channel 9!</strong></a>

<span style="color: #ff0000;"><strong>[Update 28 January 2019:</strong></span> <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2019/01/28/aaronlocker-moved-to-github/" rel="noopener"><strong>content moved to GitHub</strong></a><span style="color: #ff0000;"><strong>]</strong></span>

This update to the <a target="_blank" href="https://blogs.msdn.microsoft.com/aaron_margosis/2018/06/26/announcing-application-whitelisting-with-aaronlocker/" rel="noopener">original 0.9 release</a> includes these improvements:
<ul>
 	<li>Documentation updates, particularly in the area of Group Policy control;</li>
 	<li>Blocks execution from writable alternate data streams on user-writable directories under the Windows and Program Files directories;</li>
 	<li>Blocks older versions of <a target="_blank" href="https://docs.microsoft.com/en-us/sysinternals/downloads/bginfo" rel="noopener">Sysinternals BgInfo.exe</a> that were not AppLocker-aware and allowed execution of unapproved VBScript files (N.B., release of an AppLocker-aware BgInfo.exe is imminent -- subscribe to <a target="_blank" href="https://blogs.technet.microsoft.com/sysinternals" rel="noopener">the Sysinternals blog</a> for notifications);</li>
 	<li>Improvements to the information retrieved from event logs, including an additional date/time column that Excel can filter on, a file extension column that can help track files with non-standard extensions, and a label for when an event is associated with the built-in local administrator account;</li>
 	<li>Additional info in the event workbook's Summary tab, and a new "Users and event counts" tab;</li>
 	<li>Performance improvements in Generate-EventWorkbook.ps1;</li>
 	<li>PowerShell v2 DLLs blocked with explicit deny rules instead of exceptions;</li>
 	<li>Minor bug fixes.</li>
</ul>
I still intend to put it on GitHub but haven't gotten to it yet. In the meantime, I want to get the update out, so you can download <strong>the updated AaronLocker </strong><del>here</del> <strong><a target="_blank" href="https://github.com/Microsoft/AaronLocker" rel="noopener">from GitHub</a></strong>. (I also need to create new sample event content, but don't want to hold this up any longer.)

Brief description of "AaronLocker" repeated from original post:
<blockquote>AaronLocker is designed to make the creation and maintenance of robust, strict, AppLocker-based whitelisting rules as easy and practical as possible. The entire solution involves a small number of PowerShell scripts. You can easily customize rules for your specific requirements with simple text-file edits. AaronLocker includes scripts that document AppLocker policies and capture event data into Excel workbooks that facilitate analysis and policy maintenance.

AaronLocker is designed to restrict program and script execution by non-administrative users. Note that AaronLocker does not try to stop administrative users from running anything they want – and AppLocker cannot meaningfully restrict administrative actions anyway. A determined user with administrative rights can easily bypass AppLocker rules.

AaronLocker’s strategy can be summed up as: if a non-admin could have put a program or script onto the computer – i.e., it is in a user-writable directory – don’t allow it to execute unless it has already been specifically allowed by an administrator. This will stop execution if a user is tricked into downloading malware, if an exploitable vulnerability in a program the user is running tries to put malware on the computer, or if a user intentionally tries to download and run unauthorized programs.

AaronLocker works on all supported versions of Windows that can provide AppLocker.

<em>A personal note: the name “AaronLocker” was <a target="_blank" href="https://blogs.msdn.microsoft.com/cjacks/" rel="noopener">Chris</a> (<a target="_blank" href="https://twitter.com/appcompatguy" rel="noopener">@appcompatguy</a>) <a target="_blank" href="https://blogs.msdn.microsoft.com/cjacks/" rel="noopener">Jackson’s</a> idea – not mine – and I resisted it for a long time. I finally gave in because I couldn’t come up with a better name.</em>

The zip file contains full documentation, all the scripts, and sample outputs.</blockquote>
By the way, I'd also like to point out that AaronLocker addresses many of the AppLocker bypasses that various sites have published.]]></content:encoded>
    </item>
    <item>
      <title>ANNOUNCING: Application whitelisting with "AaronLocker"</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/announcing-application-whitelisting-with-aaronlocker</link>
      <pubDate>Tue, 26 Jun 2018 05:09:42 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=515</guid>
      <description><![CDATA[[Update 11 Oct 2018: "AaronLocker" v0.91 released]

Announcing the pre-release (v0.9) of...]]></description>
      <content:encoded><![CDATA[<span style="color: #ff0000;"><strong>[Update 11 Oct 2018: <a href="https://blogs.msdn.microsoft.com/aaron_margosis/2018/10/11/aaronlocker-update-v0-91-and-see-aaronlocker-in-action-on-channel-9/">"AaronLocker" v0.91 released</a>]</strong></span>

Announcing the pre-release (v0.9) of "AaronLocker:" robust and practical application whitelisting for Windows.

AaronLocker is designed to make the creation and maintenance of robust, strict, AppLocker-based whitelisting rules as easy and practical as possible. The entire solution involves a small number of PowerShell scripts. You can easily customize rules for your specific requirements with simple text-file edits. AaronLocker includes scripts that document AppLocker policies and capture event data into Excel workbooks that facilitate analysis and policy maintenance.

AaronLocker is designed to restrict program and script execution by non-administrative users. Note that AaronLocker does not try to stop administrative users from running anything they want – and AppLocker cannot meaningfully restrict administrative actions anyway. A determined user with administrative rights can easily bypass AppLocker rules.

AaronLocker’s strategy can be summed up as: if a non-admin could have put a program or script onto the computer – i.e., it is in a user-writable directory – don’t allow it to execute unless it has already been specifically allowed by an administrator. This will stop execution if a user is tricked into downloading malware, if an exploitable vulnerability in a program the user is running tries to put malware on the computer, or if a user intentionally tries to download and run unauthorized programs.

AaronLocker works on all supported versions of Windows that can provide AppLocker.

<em>A personal note: the name “AaronLocker” was <a target="_blank" href="https://blogs.msdn.microsoft.com/cjacks/" rel="noopener">Chris</a> (<a target="_blank" href="https://twitter.com/appcompatguy" rel="noopener">@appcompatguy</a>) <a target="_blank" href="https://blogs.msdn.microsoft.com/cjacks/" rel="noopener">Jackson’s</a> idea – not mine – and I resisted it for a long time. I finally gave in because I couldn’t come up with a better name.</em>

For now, download AaronLocker <del>here</del> <span style="color: #ff0000;"><a href="https://blogs.msdn.microsoft.com/aaron_margosis/2018/10/11/aaronlocker-update-v0-91-and-see-aaronlocker-in-action-on-channel-9/">from the updated page</a></span> (I will move it to GitHub sometime soon). The zip file contains full documentation, all the scripts, and sample outputs.

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>The Case of the Reverting Office Theme (resolved with a long-running Procmon trace)</title>
      <link>https://docs.microsoft.com/archive/blogs/aaron_margosis/the-case-of-the-reverting-office-theme-resolved-with-a-long-running-procmon-trace</link>
      <pubDate>Mon, 14 Aug 2017 22:02:57 GMT</pubDate>
      <dc:creator><![CDATA[Aaron Margosis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aaron_margosis/?p=395</guid>
      <description><![CDATA[Several times a day, all my Office apps kept reverting to the default “Colorful” theme, even though...]]></description>
      <content:encoded><![CDATA[Several times a day, all my Office apps kept reverting to the default “Colorful” theme, even though I had set it to the “White” theme. I prefer the “White” theme because I customize the Quick Access Toolbar in my Office apps with extra icons. Those icons have colors, and the oddly-misnamed “Colorful” theme renders them in monochrome, making it harder to tell what they are. I repeatedly set the theme back to “White,” but several hours later when I’d start an Office app <span>I’d find that it had </span>reverted. I didn’t know whether it was a bug in one or more Office apps, a setting pushed to my system through Group Policy Preferences, or something else.

<em><a href="https://msdnshared.blob.core.windows.net/media/2017/08/QAT-Outlook-Both.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/QAT-Outlook-Both.png" alt="Quick Access Toolbar in two themes" /></a>
“Colorful” (???) theme on the left; “White” theme on the right.</em>

“When in doubt, run Process Monitor!” was David Solomon’s exhortation to anyone trying to troubleshoot on the Windows platform, and it’s still good advice. So is “Keep Calm and Run Procmon” (see below for more about that).

Because the theme setting changed only a few times a day, I knew I’d probably need to keep Procmon running for a long time to capture the instant when the setting changed. If you’ve ever left Procmon running for a long time by accident, you’ve probably seen it exhaust its own virtual memory, consume a lot of system commit, and start to bog down the entire computer. There are several different ways to perform long-running traces efficiently with Procmon, including using backing files instead of virtual memory, or using the “history depth” option to set the maximum number of events to retain. I chose to set a filter for just the items I wanted to monitor, and discard all other event data using the “Drop Filtered Events” option.

To identify which items to monitor, I started Procmon, dragged the crosshairs toolbar icon (“Include Process From Window”) over an Excel window, then opened the Filter dialog box and added a “Category is Write” criterion. Procmon now showed only “write” events from the Excel process. I opened File|Options and changed the theme, stopped the Procmon trace, and looked in the trace for events that seemed relevant. I quickly came across these two:
<p style="padding-left: 30px;">HKU\<em>sid</em>\Software\Microsoft\Office\16.0\Common\UI Theme
HKU\<em>sid</em>\Software\Microsoft\Office\16.0\Common\PendingUITheme</p>
(…where <em>sid </em>is my domain account’s security identifier. If your account is a member of the Administrators group, you’d normally see HKCU instead of HKU\<em>sid</em>. Because I’ve been running as a non-admin again, I needed to run Procmon in a separate administrative account.)

I cleared the trace, reset the filter, and then added these two criteria to the filter:
<p style="padding-left: 30px;">Path is HKU\<em>sid</em>\Software\Microsoft\Office\16.0\Common\UI Theme
Path is HKU\<em>sid</em>\Software\Microsoft\Office\16.0\Common\PendingUITheme</p>
I didn’t filter on “Category is Write” because I wanted to see what was reading the values, too. Instead I <em>highlighted</em> Category is Write so that write events would stand out. Most importantly, I enabled the “Drop Filtered Events” option on the Filter menu.

A little less than 6 hours later, I had my answer: it wasn’t Group Policy Preferences as I had hypothesized, but rather MsoSync.exe (“Microsoft Office Document Cache”), which had been started by GROOVE.EXE (OneDrive For Business). I don’t have access to Office symbols, so I couldn’t see the relevant function names when I inspected the call stacks. But I could deliver the Procmon trace to the Office team along with my bug report. They of course have Office symbols with which they can identify in which function and in which source file the bug lives.

<em><a href="https://msdnshared.blob.core.windows.net/media/2017/08/OfficeUITheme.png"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/OfficeUITheme.png" alt="Procmon trace" /></a>
Six hours of Procmon trace monitoring two registry values, highlighting the “write” events, and dropping all other events.</em>

I submitted the Procmon trace along with my bug report to the Office team. A few days later, a new Office build had been installed on my computer, with the bug no longer present.

How badly did a 6-hour trace bog down my system? Not at all! Procmon captured and retained only 21 events during that entire period. In fact, I accidentally left the trace running <em>for three days</em>, during which I continued to run Office programs. Procmon captured a total of just 116 events. Process Explorer reported that even after running for three days, Procmon consumed only 146 MB of private bytes and 227 MB of working set, far less than many other programs I was also running. (And the reason that it was even as big as it was is that although Procmon captured a minimal number of events, it continues to capture information about all the processes that ran at any time during the trace.)

For complete documentation about the Sysinternals tools, along with tons of tips, tricks, and techniques, get a copy of <em><a href="https://www.microsoftpressstore.com/store/troubleshooting-with-the-windows-sysinternals-tools-9780735684447">Troubleshooting with the Windows Sysinternals Tools</a></em>. (Makes a great gift!)

Also, cultural icon Chris Jackson has put the meme “Keep Calm and Run Procmon” on a t-shirt that <a href="https://aka.ms/tshirt/keepcalm">you can purchase</a>. (I bought a black one. It looks sharp.) Proceeds from these t-shirt sales go to the Seattle Humane Society.
<a href="https://msdnshared.blob.core.windows.net/media/2017/08/KeepCalm.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2017/08/KeepCalm.jpg" alt="Keep Calm and Run Procmon t-shirt" /></a>

&nbsp;]]></content:encoded>
    </item>
  </channel>
</rss>