{"id":988,"date":"2009-02-01T12:37:49","date_gmt":"2009-02-01T07:07:49","guid":{"rendered":"http:\/\/198.58.113.91\/blog\/?p=988"},"modified":"2022-12-07T10:38:42","modified_gmt":"2022-12-07T05:08:42","slug":"process-monitor-track-events-generate-log-file","status":"publish","type":"post","link":"https:\/\/www.winhelponline.com\/blog\/process-monitor-track-events-generate-log-file\/","title":{"rendered":"Using Process Monitor to Track Registry and File System Changes"},"content":{"rendered":"<p>Process Monitor is an excellent troubleshooting tool from Windows Sysinternals that displays the files and registry keys that applications access in real-time. The results can be saved to a log file, which you can send to an expert for analyzing a problem and troubleshooting it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30661\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/procmon-main-window.png\" alt=\"Process Monitor window\" width=\"747\" height=\"261\" \/><\/p>\n<p>This article tells you how to use Process Monitor to capture registry and file system accesses by applications. You can also save the events to a log file for further analysis.<!--more--><\/p>\n<h2>Tracing Registry and File System Using Process Monitor<\/h2>\n<p><em><strong>Scenario:<\/strong>\u00a0Let&#8217;s assume you&#8217;re unable to write to the <b>HOSTS<\/b> file in Windows, and want to know what&#8217;s happening under the hood. Every step in the following article revolves around this sample scenario.<\/em><\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6338 alignleft\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2018\/07\/icotip.gif\" alt=\"tips bulb icon\" width=\"34\" height=\"34\" \/>Note:<\/strong> If a support technician has asked you to save &#8220;All Events,&#8221; then you don&#8217;t need to set the Filtering options. Proceed to &#8220;Step 2&#8221; in that case.<\/p>\n<h3>Step 1: Running Process Monitor &amp; Configuring Filters<\/h3>\n<ol>\n<li>Download <a href=\"http:\/\/technet.microsoft.com\/en-us\/sysinternals\/bb896645.aspx\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Process Monitor<\/a> from Microsoft.<\/li>\n<li>Extract the zip file contents to a folder of your choice.<\/li>\n<li>Run Process Monitor.<\/li>\n<li>If the Filter dialog doesn&#8217;t open automatically, press <kbd>Ctrl<\/kbd> + <kbd>L<\/kbd> to open the Process Monitor Filter dialog.<\/li>\n<li>Click &#8220;Reset&#8221; to clear the existing filters.<\/li>\n<li>Include the processes that you want to track the activity on. For this example, you want to include <code>Notepad.exe<\/code> in the (Include) Filters.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30662\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/procmon-filters-box.png\" alt=\"process monitor filters\" width=\"592\" height=\"364\" \/><\/li>\n<li>Click <b>Add<\/b>, and click <b>OK<\/b>.\n<div class=\"newline\"><em><strong>Tip:<\/strong> You can add multiple entries as well, in case you want to track a few more processes along with <code>Notepad.exe<\/code>. To keep this example more straightforward, let&#8217;s include only <code>Notepad.exe<\/code>.<\/em><\/div>\n<\/li>\n<li>From the <b>Options<\/b> menu, click <b>Select Columns<\/b>.<\/li>\n<li>Under &#8220;Event Details,&#8221; enable <b>Sequence Number<\/b>, and click <b>OK<\/b>.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30663\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/procmon-options-dialog.png\" alt=\"process monitor columns dialog\" width=\"356\" height=\"544\" \/><\/li>\n<\/ol>\n<h3>Step 2: Capturing Events<\/h3>\n<ol>\n<li>Open Notepad.<\/li>\n<li>Switch to the Process Monitor window.<\/li>\n<li>Enable the &#8220;Capture&#8221; mode (if it&#8217;s not already ON). You can see the status of the &#8220;Capture&#8221; mode via the Process Monitor toolbar.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30660\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/procmon-capture-button-1.png\" alt=\"Process Monitor start capturing\" width=\"633\" height=\"132\" \/><\/p>\n<div class=\"newline\"><i>The highlighted button above is the &#8220;Capture&#8221; button, which is currently disabled. You need to click that button (or press <kbd>Ctrl<\/kbd> + <kbd>E<\/kbd>) to start tracing. <\/i><em>You&#8217;ll now see the Process Monitor main window capturing registry and file events by processes in real time.<\/em><\/div>\n<\/li>\n<li>Cleanup the existing events list using <kbd>Ctrl<\/kbd> + <kbd>X<\/kbd> key sequence (<span style=\"font-family: impact, sans-serif;\">Important<\/span>) and start afresh<\/li>\n<li>Now switch to Notepad and try to <b>reproduce the problem<\/b>.\n<div class=\"newline\"><i>To reproduce the problem (for this example), try writing to the HOSTS file (<code>C:\\Windows\\System32\\Drivers\\Etc\\HOSTS<\/code>) and saving it. Windows offers to save the file (by showing the Save As dialog) with a different name or in another location<\/i>.<\/div>\n<h4><i>So, what happens under the hood when you save to HOSTS? Process Monitor shows that, exactly.<\/i><\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30665\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/procmon-access-denied-events.png\" alt=\"process monitor - track access denied\" width=\"750\" height=\"171\" \/><\/li>\n<li>Switch to the Process Monitor window, and turn off Capturing (<kbd>Ctrl<\/kbd> + <kbd>E<\/kbd>) as soon as you reproduce the problem.\n<div class=\"qt\"><b>Important:<\/b> Reproduce the problem quickly when the trace is On. And turn off capturing as soon as you finish reproducing the problem. This prevents Process Monitor from recording other unneeded data (which makes the analysis more difficult). So it would be best if you did everything as quickly as possible.<\/div>\n<p><strong>Solution:<\/strong> The log file above tells us that Notepad encountered an <code><strong>ACCESS DENIED<\/strong><\/code> error when writing to the <code>HOSTS<\/code> file. The solution would be to run Notepad elevated (right-click and choose &#8220;Run as Administrator&#8221;) to write to the <code>HOSTS<\/code> file successfully.<\/li>\n<\/ol>\n<h3>Step 3: Saving the Output<\/h3>\n<ol>\n<li>In the Process Monitor window, select the <b>File<\/b> menu and click <b>Save<\/b><\/li>\n<li>Select <b>Native Process Monitor Format (PML)<\/b>, mention the output file name and Path, and save the file.<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-30666\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/2009\/02\/procmon-save-log.png\" alt=\"ProcMon PML log\" width=\"466\" height=\"394\" \/><em><strong><strong>Important:<\/strong><\/strong> If a support technician has asked you to save &#8220;All Events,&#8221; select &#8220;All Events&#8221; and save the file. Otherwise, select &#8220;Events displayed using current filter&#8221; and save the file.<\/em><\/li>\n<li>Right-click on the <code>Logfile.PML<\/code>\u00a0file, click Send To, and choose <code>Compressed (zipped) folder<\/code>. This compresses the file by <code>~90%<\/code>. Look at the graphic below.\u00a0You certainly want to zip the log file before sending it to someone.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.winhelponline.com\/blog\/wp-content\/uploads\/archived\/pmon-log-7.png\" width=\"360\" height=\"61\" \/><\/li>\n<\/ol>\n<p><em><strong>Editor&#8217;s note:<\/strong> I usually suggest my clients save the log with the <b>All events<\/b> option for a thorough analysis. If you&#8217;re going to send me a Process Monitor log, make sure you enable the <b>All Events<\/b> option when saving the log file. Also, don&#8217;t forget the compress (.zip) the log file first.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Process Monitor is an excellent troubleshooting tool from Windows Sysinternals that displays the files and registry keys that applications access in real-time. The results can be saved to a log file, which you can send to an expert for analyzing a problem and troubleshooting it. This article tells you how to use Process Monitor to &#8230; <a title=\"Using Process Monitor to Track Registry and File System Changes\" class=\"read-more\" href=\"https:\/\/www.winhelponline.com\/blog\/process-monitor-track-events-generate-log-file\/\" aria-label=\"Read more about Using Process Monitor to Track Registry and File System Changes\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[7],"tags":[414],"class_list":["post-988","post","type-post","status-publish","format-standard","hentry","category-windows","tag-process-monitor"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2149,"url":"https:\/\/www.winhelponline.com\/blog\/process-monitor-track-access-denied-registry-file-events\/","url_meta":{"origin":988,"position":0},"title":"How to Track &#8220;Access Denied&#8221; Registry and File Events Using Process Monitor","author":"Ramesh","date":"March 17, 2016","format":false,"excerpt":"A well-written application does proper error handling, notifying the user in detail about the error it countered and how to go about fixing it, rather than failing silently or throwing up an obscure error code and quitting. This post tells you how to trace \"Access Denied\" events for file and\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/w10\/p-mon-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1062,"url":"https:\/\/www.winhelponline.com\/blog\/resource-monitor-find-process-locked-file-windows-7\/","url_meta":{"origin":988,"position":1},"title":"How to Use Resource Monitor to Find Which Process Has Locked a File","author":"Ramesh","date":"July 21, 2010","format":false,"excerpt":"Many folks use Process Explorer from Windows Sysinternals to gather information about running processes and their open handles. In addition, there is an excellent but less familiar utility in-built with Windows 7 and higher (including Windows 10\/11). The built-in utility is Resource Monitor, which provides complete details of running processes,\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"openfiles","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2016\/10\/openfiles-4.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":19471,"url":"https:\/\/www.winhelponline.com\/blog\/cannot-import-reg-not-all-data-was-successfully\/","url_meta":{"origin":988,"position":2},"title":"Cannot import .REG file; Not all data was successfully written to registry","author":"Ramesh","date":"October 22, 2020","format":false,"excerpt":"Sometimes, when applying the registry settings using a .reg file, you may get one of the following errors: Cannot import file.reg: Not all data was successfully written to the registry. Some keys are open by the system or other processes, or you have insufficient privileges to perform this operation. Cannot\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"cannot import .reg file - error accessing registry","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2020\/10\/reg-file-import-error-4.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":76091,"url":"https:\/\/www.winhelponline.com\/blog\/boot-trace-process-monitor\/","url_meta":{"origin":988,"position":3},"title":"How to Run a Boot Trace Using Process Monitor","author":"Ramesh","date":"July 25, 2024","format":false,"excerpt":"Process Monitor is an excellent diagnostic tool from Microsoft Sysinternals. It can run a trace during the current Windows session or trace the boot process. Let's see how to enable boot tracing using Process Monitor. Enable Boot Logging using Process Monitor Download Process Monitor and run it. Read and accept\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"Process monitor boot logging","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/procmon-boot-log-9.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/procmon-boot-log-9.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/procmon-boot-log-9.png?resize=525%2C300&ssl=1 1.5x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2024\/07\/procmon-boot-log-9.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":5637,"url":"https:\/\/www.winhelponline.com\/blog\/process-monitor-unable-to-write-procmon23-boot-logging\/","url_meta":{"origin":988,"position":4},"title":"Process Monitor &#8220;Unable to write PROCMON23.SYS&#8221; Enabling Boot Logging","author":"Ramesh","date":"October 25, 2017","format":false,"excerpt":"Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process\/thread activity. It can also trace the entire boot process and save to a PML log file. When enabling the setting \"Enable Boot Logging\" from the Options menu in Process Monitor, the following error\u2026","rel":"","context":"In &quot;Utilities&quot;","block_context":{"text":"Utilities","link":"https:\/\/www.winhelponline.com\/blog\/category\/utilities\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/10\/procmon-boot-logging-error.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":5946,"url":"https:\/\/www.winhelponline.com\/blog\/program-constantly-writing-hard-disk-io\/","url_meta":{"origin":988,"position":5},"title":"Find Which Program is Constantly Reading or Writing to Disk","author":"Ramesh","date":"November 4, 2017","format":false,"excerpt":"Does your hard drive LED in the computer's chassis show non-stop disk input or output activity? If the I\/O operations occur at an alarming rate, sometimes even at 100% disk usage, find the process and stop it from running, especially if you're using Solid State Drive. If you're wondering which\u2026","rel":"","context":"In &quot;Windows&quot;","block_context":{"text":"Windows","link":"https:\/\/www.winhelponline.com\/blog\/category\/microsoft\/windows\/"},"img":{"alt_text":"track disk io usage","src":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/track-disk-usage-windows.jpg?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/track-disk-usage-windows.jpg?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.winhelponline.com\/blog\/wp-content\/uploads\/2017\/11\/track-disk-usage-windows.jpg?resize=525%2C300&ssl=1 1.5x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/988","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/comments?post=988"}],"version-history":[{"count":0,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/posts\/988\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/media?parent=988"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/categories?post=988"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.winhelponline.com\/blog\/wp-json\/wp\/v2\/tags?post=988"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}