<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Aaron Margosis' "Non-Admin" and App-Compat WebLog</title><link>http://blogs.msdn.com/b/aaron_margosis/</link><description>The Non-Admin blog - running with least privilege on the desktop... and then dealing with the application compatibility fallout</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Lucinda Williams radio show...</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2012/05/01/lucinda-williams-radio-show.aspx</link><pubDate>Tue, 01 May 2012 23:54:37 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10299718</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10299718</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2012/05/01/lucinda-williams-radio-show.aspx#comments</comments><description>&lt;p&gt;Purely personal blog post this time, nothing to do with Windows or Microsoft...&lt;/p&gt;
&lt;p&gt;Several lifetimes ago, I&amp;nbsp;was a&amp;nbsp;DJ on &lt;a title="WTJU-FM" href="http://www.wtju.net/index" target="_blank"&gt;WTJU-FM&lt;/a&gt;, the free-form/block-programmed radio station at the &lt;a href="http://www.virginia.edu/" target="_blank"&gt;University of Virginia&lt;/a&gt; where the on-air DJ decides what to play rather than a program&amp;nbsp;director (or&amp;nbsp;megacorporations).&amp;nbsp; This Friday, May 4, I will be back to host a 2-hour show of the music of &lt;a title="Lucinda Williams" href="http://www.lucindawilliams.com/" target="_blank"&gt;Lucinda Williams&lt;/a&gt; during WTJU's week-long &lt;a href="http://www.wtju.net/record/marathons/folk2012/index" target="_blank"&gt;Folk Marathon&lt;/a&gt; fundraiser.&amp;nbsp; Tune in and enjoy!&amp;nbsp; Call in and donate!&lt;/p&gt;
&lt;p&gt;The show will air on Friday, May 4 from 8:00pm to 10:00pm US Eastern time (Saturday midnight to 2am UTC).&amp;nbsp; If you're in central Virginia, you can hear the show on 91.1 FM.&amp;nbsp; Everywhere else, go to &lt;a href="http://www.wtju.net/stream"&gt;http://www.wtju.net/stream&lt;/a&gt; and pick the stream of your choice.&amp;nbsp; (I usually tune in to the &lt;a href="http://www.wtju.net/stream/wtju-256.ogg" target="_blank"&gt;256k Ogg Vorbis stream&lt;/a&gt; using &lt;a href="http://www.foobar2000.org/"&gt;Foobar 2000&lt;/a&gt;.)&amp;nbsp; If you miss the live broadcast, you can listen to the show from the WTJU &lt;a href="http://www.wtju.net/vault" target="_blank"&gt;Tape Vault&lt;/a&gt; for up to two weeks after it airs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10299718" width="1" height="1"&gt;</description></item><item><title>Interviewed about the Sysinternals book on Let's Talk Computers</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2012/03/21/interviewed-about-the-sysinternals-book-on-let-s-talk-computers.aspx</link><pubDate>Wed, 21 Mar 2012 17:56:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10286001</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10286001</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2012/03/21/interviewed-about-the-sysinternals-book-on-let-s-talk-computers.aspx#comments</comments><description>&lt;p&gt;Let's Talk Computers ranks as one of the longest-running computer radio talk shows. I enjoyed it recently when they interviewed me about the Windows Sysinternals Administrator's Reference.&amp;nbsp; They published Part 1 of that interview on March 3.&amp;nbsp; Check it out here:&lt;br /&gt;&lt;a href="http://www.lets-talk-computers.com/guests/microsoft_press/windows_systernals_admin_reference/"&gt;http://www.lets-talk-computers.com/guests/microsoft_press/windows_systernals_admin_reference/&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10286001" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category></item><item><title>Interviewed on “Bytes by TechNet”</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/10/21/interviewed-on-bytes-by-technet.aspx</link><pubDate>Fri, 21 Oct 2011 05:52:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10228484</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10228484</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/10/21/interviewed-on-bytes-by-technet.aspx#comments</comments><description>&lt;p&gt;Last May at TechEd US, I sat down for a six-minute interview with &lt;a href="http://technet.microsoft.com/en-us/matt-hester" target="_blank"&gt;Matt Hester&lt;/a&gt; about the &lt;a href="http://www.amazon.com/Windows-Sysinternals-Administrators-Reference-Russinovich/dp/073565672X" target="_blank"&gt;Windows Sysinternals Administrators Reference&lt;/a&gt; (the book I co-authored with &lt;a href="http://www.microsoft.com/presspass/exec/techfellow/Russinovich/default.mspx" target="_blank"&gt;Mark Russinovich&lt;/a&gt;) and &lt;a href="http://blogs.technet.com/b/fdcc/archive/2010/10/06/sticking-with-well-known-and-proven-solutions.aspx" target="_blank"&gt;issues I see in my work with customers&lt;/a&gt;.&amp;#160; &lt;/p&gt;  &lt;p&gt;That interview, part of the &lt;a href="http://technet.microsoft.com/en-us/ff715303" target="_blank"&gt;Bytes By TechNet&lt;/a&gt; series, can now be seen online &lt;a href="http://technet.microsoft.com/en-us/hh547010.aspx" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; In addition to insights about the book and my work, the interview shows a &lt;em&gt;particularly&lt;/em&gt; bad hair day for me during my year-long experiment growing it long again.&amp;#160; (That experiment coincidentally ended just a few hours ago.)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10228484" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category></item><item><title>Top Ten Deployment Blockers</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/10/18/top-ten-deployment-blockers.aspx</link><pubDate>Tue, 18 Oct 2011 19:45:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10227111</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10227111</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/10/18/top-ten-deployment-blockers.aspx#comments</comments><description>&lt;p&gt;My colleague &lt;a href="http://www.linkedin.com/pub/shelly-bird/26/bb1/a32" target="_blank"&gt;Shelly Bird&lt;/a&gt;, a &lt;a href="http://fcw.com/Articles/2008/03/19/2008-Federal-100-award-winners-A--Duna.aspx?Page=3" target="_blank"&gt;highly esteemed&lt;/a&gt; Architect in Microsoft Public Sector Services, has years of experience in desktop and server deployments.&amp;#160; She has seen what works and a whole lot of what doesn’t.&amp;#160; Now she is bringing her observations to the blogosphere, kicking off with a Top Ten list of deployment blockers.&amp;#160; I was really excited when she told me about it because it’s not going to be just another tech-oriented blog about scripting how-to, specific security settings and application compatibility.&amp;#160; While those issues are important to deployment projects, that’s not where projects tend to run into the most trouble.&amp;#160; This is much higher-level and should be read by executives.&amp;#160; It’s not really even Windows-specific.&amp;#160; It’s about decision-making (or decision-delaying) and organization culture issues.&lt;/p&gt;  &lt;p&gt;Forward this link to your management and executives.&amp;#160; If you are a manager or an executive, forward it to your colleagues and friends:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://deploydepot.net/" target="_blank"&gt;The Deploy Depot Blog&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10227111" width="1" height="1"&gt;</description></item><item><title>FAQ: Where Do I Save Files, and How Exactly Do I Do That?</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/09/25/faq-where-do-i-save-files-and-how-exactly-do-i-do-that.aspx</link><pubDate>Sun, 25 Sep 2011 19:35:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10216395</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10216395</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/09/25/faq-where-do-i-save-files-and-how-exactly-do-i-do-that.aspx#comments</comments><description>&lt;p&gt;&lt;meta name="Generator" content="Microsoft Word 14 (filtered)" /&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;The correct ways to identify folder paths to store files depends on the programming technology you use. This blog post shows how to do it in C++, C# and VB. NET, PowerShell, Windows Script Host (VBScript and JScript), and as a last resort, environment variables.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;One of the more common programming mistakes that lead to compatibility problems is the incorrect specification of folder paths in programs.&amp;nbsp; For example, it is not uncommon for programs to assume that the user&amp;rsquo;s profile is under &amp;ldquo;C:\Documents and Settings&amp;rdquo;.&amp;nbsp; These default paths are always subject to change and have changed across different versions of Windows.&amp;nbsp; User profiles were stored under %SystemDrive%\WINNT\Profiles, then under &amp;ldquo;%SystemDrive%\Documents and Settings&amp;rdquo;, and now under %SystemDrive%\Users. The &amp;ldquo;All Users&amp;rdquo; profile is now called &amp;ldquo;Public&amp;rdquo;, and what was in &amp;ldquo;%USERPROFILE%\Local Settings\Application Data&amp;rdquo; is now in &amp;ldquo;%USERPROFILE%\AppData\Local&amp;rdquo;. Also, part of what used to be under the &amp;ldquo;All Users&amp;rdquo; profile is now in a separate folder location (by default, C:\ProgramData).&lt;/p&gt;
&lt;p class="MsoNormal"&gt;How can programs work correctly when these paths keep changing?&amp;nbsp; Well, applications that are written correctly don&amp;rsquo;t require any modification to get the correct folder locations on all versions of Windows. Some rules you should follow:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Do not hardcode any file system paths.&lt;/li&gt;
&lt;li&gt;Do not assume that Windows is installed on the C: drive, that there is a &amp;ldquo;Documents and Settings&amp;rdquo; or a &amp;ldquo;Users&amp;rdquo; folder, or a &amp;ldquo;Program Files&amp;rdquo; folder.&lt;/li&gt;
&lt;li&gt;DO use symbolic constants and Windows APIs or environment variables to identify the appropriate place to put file content.&lt;/li&gt;
&lt;li&gt;Distinguish between per-user and shared content.&lt;/li&gt;
&lt;li&gt;Distinguish between files users should be able to browse in Explorer (e.g., documents that users create) and files that aren&amp;rsquo;t intended for direct access by users (application configuration settings, for example). These file types get stored in different locations.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are the correct ways to identify folder locations using a variety of programming technologies:&lt;/p&gt;
&lt;h2&gt;C++&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;Use the SHGetSpecialFolderPath function with CSIDL constants. For programs designed to run only on Windows Vista or newer, use the SHGetKnownFolderPath function with KNOWNFOLDERID constants. See the following links:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SHGetSpecialFolderPath: &lt;a href="http://msdn.microsoft.com/en-us/library/bb762204(v=VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb762204(v=VS.85).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;CSIDL: &lt;a href="http://msdn.microsoft.com/en-us/library/bb762494(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb762494(VS.85).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SHGetKnownFolderPath: &lt;a href="http://msdn.microsoft.com/en-us/library/bb762188(v=VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb762188(v=VS.85).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;KNOWNFOLDERID: &lt;a href="http://msdn.microsoft.com/en-us/library/dd378457(v=VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/dd378457(v=VS.85).aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal"&gt;These two examples demonstrate retrieving the paths for the current user&amp;rsquo;s Documents folder and the computer&amp;rsquo;s shared Documents folder:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;HRESULT hr;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;TCHAR szPath[MAX_PATH];&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;hr = SHGetFolderPath(NULL, CSIDL_MYDOCUMENTS, NULL, SHGFP_TYPE_CURRENT, szPath);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;if (SUCCEEDED(hr))&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;hr = SHGetFolderPath(NULL, CSIDL_COMMON_DOCUMENTS, NULL, SHGFP_TYPE_CURRENT, szPath);&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;if (SUCCEEDED(hr))&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;{&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;C#/VB .NET (using Managed code)&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;Use the Environment.GetFolderPath method, passing in a Environment.SpecialFolder enumeration. The System.IO.Path.Combine method can be used to combine path parts. For example, the following C# code returns the path to a &amp;ldquo;MyData&amp;rdquo; subfolder in the current user&amp;rsquo;s Documents folder:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;string sPath;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;sPath = System.IO.Path.Combine(&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "MyData");&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;This is the same code implemented in VB .NET:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;Dim sPath As String&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;sPath = System.IO.Path.Combine( _&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), _&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "MyData")&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p class="MsoNormal"&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Environment.GetFolderPath &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.environment.getfolderpath.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.environment.getfolderpath.aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SpecialFolder enumeration: &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx"&gt;http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;PowerShell&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;Windows PowerShell is built on .NET and can invoke many .NET methods and resources from the PowerShell command line interface or from Notepad-editable script files. This is how to implement the earlier sample building a path to a &amp;ldquo;MyData&amp;rdquo; subfolder of the user&amp;rsquo;s Documents folder using PowerShell:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;$sPath = [System.IO.Path]::Combine( &lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Environment]::GetFolderPath([Environment+SpecialFolder]::MyDocuments),&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "MyData")&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;C#/VB .NET Using Native Methods (P/Invoke)&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;You can invoke the native Windows SHGetFolderPath API from C# or VB .NET code using Platform Invoke (a.k.a., P/Invoke) methods. See &lt;a href="http://pinvoke.net/default.aspx/shell32/SHGetFolderPath.html"&gt;http://pinvoke.net/default.aspx/shell32/SHGetFolderPath.html&lt;/a&gt; for examples. This may be useful because the native CSIDL enumeration includes many more folder locations than the .NET SpecialFolder enumeration did before .NET v4.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Windows Script Host &amp;ndash; JScript and VBScript&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;Windows Script Host defines a SpecialFolders collection that can be used from VBScript or JScript. The following JScript example outputs the path to the common (&amp;ldquo;all users&amp;rdquo;) desktop:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var oWsh = WScript.CreateObject("WScript.Shell");&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var sDesk = oWsh.SpecialFolders("AllUsersDesktop");&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo(sDesk);&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;And here is the same code in VBScript:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim oWsh, sDesk&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oWsh = WScript.CreateObject("WScript.Shell")&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNoSpacing"&gt;&lt;span style="font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; sDesk = oWsh.SpecialFolders("AllUsersDesktop")&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;span style="line-height: 115%; font-family: 'Lucida Console'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WScript.Echo sDesk&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;WshShell object: &lt;a href="http://msdn.microsoft.com/en-au/library/aew9yb99.aspx"&gt;http://msdn.microsoft.com/en-au/library/aew9yb99.aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;SpecialFolders Property: &lt;a href="http://msdn.microsoft.com/en-au/library/0ea7b5xe.aspx"&gt;http://msdn.microsoft.com/en-au/library/0ea7b5xe.aspx&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Environment Variables and Batch Files&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;If none of the above interfaces are available (for example, from a Cmd.exe batch file), Windows defines a relatively small number of environment variables that identify some file system locations. Using these environment variables, at least for partial paths, is better than hardcoding paths. The following table lists the filepath-related environment variables on my Windows 7 SP1 x64 system and their values. Note that these are just example values as found on a particular computer. Do not assume that the same path locations are the same on other computers. See the References for the meanings and intended purposes of these variables.&lt;/p&gt;
&lt;table style="width: 100%; border-collapse: collapse;" class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style="padding-bottom: 0cm; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; padding-top: 0cm; border: windowtext 1pt solid;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;Environment variable name&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-left-color: windowtext; border-top: windowtext 1pt solid; border-left-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;Example value&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;ALLUSERSPROFILE&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\ProgramData&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;APPDATA&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Users\&lt;i&gt;username&lt;/i&gt;\AppData\Roaming&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;CommonProgramFiles&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Program Files\Common Files&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;CommonProgramFiles(x86)&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Program Files (x86)\Common Files&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;CommonProgramW6432&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Program Files\Common Files&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;ComSpec&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Windows\system32\cmd.exe&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;HOMEDRIVE&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;HOMEPATH&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;\Users\&lt;i&gt;username&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;LOCALAPPDATA&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Users\&lt;i&gt;username&lt;/i&gt;\AppData\Local&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;ProgramData&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\ProgramData&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;ProgramFiles&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Program Files&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;ProgramFiles(x86)&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Program Files (x86)&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;ProgramW6432&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Program Files&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;PSModulePath&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;PUBLIC&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Users\Public&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;SystemDrive&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;SystemRoot&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Windows&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;TEMP&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Users\&lt;i&gt;username&lt;/i&gt;\AppData\Local\Temp&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;TMP&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Users\&lt;i&gt;username&lt;/i&gt;\AppData\Local\Temp&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;USERPROFILE&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Users\&lt;i&gt;username&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style="border-bottom: windowtext 1pt solid; border-left: windowtext 1pt solid; padding-bottom: 0cm; border-top-color: windowtext; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-width: 1pt; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;windir&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td style="border-bottom: windowtext 1pt solid; padding-bottom: 0cm; border-left-style: none; padding-left: 5.4pt; width: 50%; padding-right: 5.4pt; border-top-style: none; border-right: windowtext 1pt solid; padding-top: 0cm;" valign="top" width="50%"&gt;
&lt;p style="line-height: normal; margin-bottom: 0pt;" class="MsoNormal"&gt;&lt;span style="font-family: Lucida Console;" face="Lucida Console"&gt;C:\Windows&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p class="MsoNormal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;References:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Information about some of the new 64/32 variables: &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa384274(VS.85).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa384274(VS.85).aspx&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Definitions of default environment variables on Windows XP: &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb490954.aspx#ECAA"&gt;http://msdn.microsoft.com/en-us/library/bb490954.aspx#ECAA&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10216395" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category></item><item><title>PrivBar Update</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/09/01/privbar-update.aspx</link><pubDate>Thu, 01 Sep 2011 18:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10204519</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10204519</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/09/01/privbar-update.aspx#comments</comments><description>&lt;p&gt;PrivBar is a toolbar I &lt;a href="http://blogs.msdn.com/b/aaron_margosis/archive/2004/07/24/privbar-an-ie-explorer-toolbar-to-show-current-privilege-level.aspx" target="_blank"&gt;first published&lt;/a&gt; over seven years ago (!) for Internet Explorer and Windows Explorer.&amp;nbsp; I &lt;a href="http://blogs.msdn.com/b/aaron_margosis/archive/2008/08/15/the-return-of-privbar-x86-and-x64.aspx" target="_blank"&gt;updated it&lt;/a&gt; three years ago to add support for x64.&amp;nbsp; Today I am updating it to offer better support for Vista and Windows 7 and the corresponding Server versions.&amp;nbsp; Specifically, instead of showing a group name such as Users or Administrators in the toolbar, it shows the &lt;em&gt;integrity level&lt;/em&gt; of the current page.&amp;nbsp; One significant benefit is that this helps mitigate &lt;a href="http://blogs.msdn.com/b/cjacks/archive/2011/08/01/what-happened-to-the-zone-information-on-the-status-bar-in-ie9.aspx" target="_blank"&gt;the removal of the Protected Mode indicator from the IE9 status bar&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Download the .zip file attached to this post; extract the DLLs to a shared location (e.g., under Program Files) and register each with regsvr32.exe.&amp;nbsp; (Note that PrivBarX64.dll can be used only on x64 editions of Windows.)&amp;nbsp; The toolbars need to be enabled separately for Windows Explorer, Internet Explorer, and Internet Explorer (64 bit):&amp;nbsp; press Alt to display the menu, then choose View | Toolbars | PrivBar x64.&amp;nbsp; (It says &amp;ldquo;x64&amp;rdquo; even for the 32-bit version.)&lt;/p&gt;
&lt;p&gt;Integrity levels (ILs) were first introduced in Windows Vista and are part of what makes it possible for programs running under a single user account to have different security restrictions.&amp;nbsp; Basically (and oversimplifying), a program running at a particular integrity level cannot modify resources that are marked at a higher integrity level.&amp;nbsp; Its most prominent application is in IE&amp;rsquo;s Protected Mode.&amp;nbsp; On Windows 7 IE Protected Mode is enabled in the Internet and Restricted Sites security zones, and disabled in the Intranet, Trusted Sites, and Computer (Local Machine) zones.&amp;nbsp; With Protected Mode enabled, IE runs at the Low integrity level and cannot directly write to most areas of the file system or registry (which are marked Medium), or manipulate other programs the user is running such as by sending synthesized keystroke messages.&amp;nbsp; Sysinternals &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896653" target="_blank"&gt;Process Explorer&lt;/a&gt; is a great tool for identifying the ILs of processes on your computer (and the &lt;a href="http://www.amazon.com/Windows-Sysinternals-Administrators-Reference-Russinovich/dp/073565672X" target="_blank"&gt;Windows Sysinternals Administrator&amp;rsquo;s Reference&lt;/a&gt; is a &lt;em&gt;great &lt;/em&gt;book for learning all about Process Explorer and much more. :)&lt;/p&gt;
&lt;p&gt;The main ILs you&amp;rsquo;ll see in Windows are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Low:&amp;nbsp; less-privileged processes, including Internet Explorer with Protected Mode, as well as Microsoft Office 2010&amp;rsquo;s Protected View and &lt;a href="http://blogs.technet.com/b/fdcc/archive/2010/11/29/adobe-reader-x.aspx" target="_blank"&gt;Adobe Reader X&amp;rsquo;s sandbox mode&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Medium:&amp;nbsp; most user applications run at the Medium level.&lt;/li&gt;
&lt;li&gt;High:&amp;nbsp; user applications running with full administrative rights (e.g., apps launched with UAC&amp;rsquo;s &amp;ldquo;Run as administrator&amp;rdquo;).&lt;/li&gt;
&lt;li&gt;System:&amp;nbsp; the integrity level given to Windows services.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here&amp;rsquo;s a screenshot of Internet Explorer browsing a site in the Internet zone.&amp;nbsp; Protected Mode is enabled and PrivBar shows &amp;ldquo;Low IL&amp;rdquo; with a green circle icon.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/6622.IE_2D00_LowIL_5F00_4.png"&gt;&lt;img style="background-image: none; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="IE-LowIL" border="0" alt="IE-LowIL" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/7612.IE_2D00_LowIL_5F00_thumb_5F00_1.png" width="484" height="95" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you browse to a site in the Intranet or Trusted Sites zone, Protected Mode is disabled.&amp;nbsp; As this screenshot shows, PrivBar reports &amp;ldquo;Medium IL&amp;rdquo; with a yellow circle icon.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/0358.IE_2D00_MediumIL_5F00_2.png"&gt;&lt;img style="background-image: none; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="IE-MediumIL" border="0" alt="IE-MediumIL" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/7612.IE_2D00_MediumIL_5F00_thumb.png" width="504" height="90" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The vast majority of desktop applications run at Medium IL, including Windows Explorer, shown here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/1030.Explorer_2D00_MediumIL_5F00_2.png"&gt;&lt;img style="background-image: none; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Explorer-MediumIL" border="0" alt="Explorer-MediumIL" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/5141.Explorer_2D00_MediumIL_5F00_thumb.png" width="580" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;By default, UAC&amp;rsquo;s &amp;ldquo;Admin Approval Mode&amp;rdquo; is not applied to the built-in Administrator account, so when you log on with that account, everything runs with full administrative rights.&amp;nbsp; Here are screenshots of Internet Explorer and Windows Explorer, with PrivBar reporting &amp;ldquo;High IL&amp;rdquo; and a red circle icon.&amp;nbsp; (Note that in most scenarios, the built-in Administrator account is disabled.)&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/6131.IE_2D00_HighIL_5F00_2.png"&gt;&lt;img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="IE-HighIL" border="0" alt="IE-HighIL" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/6523.IE_2D00_HighIL_5F00_thumb.png" width="571" height="100" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/5545.Explorer_2D00_HighIL_5F00_2.png"&gt;&lt;img style="background-image: none; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Explorer-HighIL" border="0" alt="Explorer-HighIL" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/4150.Explorer_2D00_HighIL_5F00_thumb.png" width="586" height="140" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can use the new versions on Windows XP and Windows Server 2003.&amp;nbsp; Instead of the Integrity Level, it shows &amp;ldquo;Users&amp;rdquo;, &amp;ldquo;Power Users&amp;rdquo; or &amp;ldquo;Administrators&amp;rdquo; as it did in the past.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10204519" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-20-45-19/PrivBar.1.1.0.2.zip" length="703987" type="application/zip" /><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Non_2D00_admin/">Non-admin</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Utilities/">Utilities</category></item><item><title>IEInternals Reviews the Sysinternals Book</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/08/16/a-review-of-the-sysinternals-book.aspx</link><pubDate>Tue, 16 Aug 2011 07:08:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10196069</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10196069</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/08/16/a-review-of-the-sysinternals-book.aspx#comments</comments><description>&lt;p&gt;We have a lot of &lt;em&gt;really&lt;/em&gt; smart people at Microsoft, but among those there are a handful who are the most knowledgeable and the most helpful, the go-to people upon whom I can reliably depend for accurate and detailed answers to rarely-asked or never-before-asked questions.&amp;nbsp; In the realm of all things Internet Explorer, that person for me is &lt;a href="http://blogs.msdn.com/b/ieinternals/" target="_blank"&gt;Eric Lawrence&lt;/a&gt;, the author of (among many things) the &lt;a href="http://www.fiddler2.com/fiddler2/" target="_blank"&gt;Fiddler web debugging utility&lt;/a&gt; and the &lt;a href="http://blogs.msdn.com/b/ieinternals/" target="_blank"&gt;IEInternals blog&lt;/a&gt;.&amp;nbsp; Therefore, I was excited when I heard he had &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/08/15/you-should-read-the-new-sysinternals-book.aspx" target="_blank"&gt;written a review&lt;/a&gt; of Mark Russinovich&amp;rsquo;s and my Sysinternals book, and absolutely thrilled that &lt;a href="http://blogs.msdn.com/b/ieinternals/archive/2011/08/15/you-should-read-the-new-sysinternals-book.aspx" target="_blank"&gt;he liked it&lt;/a&gt;.&amp;nbsp; He didn&amp;rsquo;t just skim the book either &amp;ndash; he read it from cover to cover and experimented with the utilities along the way.&amp;nbsp; Thanks, Eric!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10196069" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category></item><item><title>Windows Sysinternals Administrator’s Reference – now available!</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/07/25/windows-sysinternals-administrator-s-reference-now-available.aspx</link><pubDate>Tue, 26 Jul 2011 03:28:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10189722</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10189722</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/07/25/windows-sysinternals-administrator-s-reference-now-available.aspx#comments</comments><description>&lt;p&gt;Many of you have long wished for comprehensive, detailed documentation of the Sysinternals utilities. &lt;a href="http://blogs.technet.com/b/markrussinovich/archive/2011/07/18/3439288.aspx"&gt;It has finally arrived&lt;/a&gt;. Over two years in the making, the Windows Sysinternals Administrator’s Reference (written by Mark Russinovich and me) is now available for purchase on &lt;a href="http://www.amazon.com/Windows-Sysinternals-Administrators-Reference-Russinovich/dp/073565672X"&gt;Amazon.com&lt;/a&gt; and available from O'Reilly in &lt;a href="http://oreilly.com/catalog/0790145316974/"&gt;4 ebook formats&lt;/a&gt;, or you can read it online through &lt;a href="http://my.safaribooksonline.com/book/-/9780735662728"&gt;Safari&lt;/a&gt;. If you do &lt;i&gt;any&lt;/i&gt; &lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/5314.9780735656727x_2D00_Small_5F00_2.jpg"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: right; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Windows Sysinternals Administrator&amp;#39;s Reference book cover" border="0" alt="Windows Sysinternals Administrator&amp;#39;s Reference book cover" align="right" src="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-37-26-metablogapi/5807.9780735656727x_2D00_Small_5F00_thumb.jpg" width="201" height="244" /&gt;&lt;/a&gt;technical work on the Windows platform, there are Sysinternals utilities that will help you. And whether you are a novice or a guru, this book will help you use the utilities more effectively. &lt;/p&gt;  &lt;p&gt;So how did I get involved in this?&lt;/p&gt;  &lt;p&gt;I was one of the technical reviewers of a previous iteration of the book that Mark had been working on with another co-author. On May 6, 2009, we reviewers received an email from the co-author saying he needed to step down from the project because the time commitment was turning out to be too great. My initial thoughts were, “Darn! This book &lt;i&gt;needs&lt;/i&gt; to be written. I wish I had the time to do it, but I don’t.” Somehow over the next few hours I convinced myself that maybe I could, and at 3am I sent Mark a note suggesting that I take over the project. (One of these days I’ll absorb the lesson I should have learned many times over that any email composed at 3am should be sat upon, not sent.)&lt;/p&gt;  &lt;p&gt;Rather than saying “yes” right away, Mark suggested that I write the Process Monitor chapter so that he could evaluate whether my writing was a good fit for his book, and I could better gauge whether I really wanted to take on the project. Within a few weeks I sent Mark a draft. He loved its organization, thoroughness and tone, so we moved forward.&lt;/p&gt;  &lt;p&gt;Writing a book – even for Microsoft Press – is outside of the regular duties of my day job in Microsoft Services, so I could do it only in my “spare time”. I had never written a book before, but I knew from other authors that it’s a big time sink. Being &lt;i&gt;very&lt;/i&gt; detail-oriented in my writing, I knew that it would take a lot longer and be a lot harder than whatever I expected, no matter what my estimates were. It actually turned out to be even worse than that. It consumed all my nights and weekends, and – especially – vacations. Yes, &lt;i&gt;all&lt;/i&gt; my vacations for the past two years have been spent holed up in my basement office, researching and writing.&lt;/p&gt;  &lt;p&gt;I committed that I wouldn’t write anything unless I observed it working as I described it and fully understood what it meant. It’s a good thing that Mark asked me to start with Process Monitor rather than Process Explorer – I might have run from the project screaming if I’d had to write Procexp up first. While Procmon ended up at 44 pages, the Procexp chapter required 62 pages to document. But because Procexp is such a comprehensive tool that touches so many different parts of Windows, it took much more than 40% as long to write. I think the quality of the book reflects the extra effort. Enjoy!&lt;/p&gt;  &lt;p&gt;Now I’m looking forward to having a real vacation again, but I don’t know whether I’ll remember how to enjoy it. I’ll probably spend all my time thinking about the Second Edition. :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10189722" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category></item><item><title>Unintended Consequences and Sysinternals at Tech-Ed Available Online</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/05/25/unintended-consequences-and-sysinternals-from-tech-ed-available-online.aspx</link><pubDate>Wed, 25 May 2011 06:30:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10168110</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10168110</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/05/25/unintended-consequences-and-sysinternals-from-tech-ed-available-online.aspx#comments</comments><description>&lt;p&gt;&lt;font size="3"&gt;The &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/10/unintended-consequences-and-sysinternals-at-tech-ed-north-america-2011.aspx" target="_blank"&gt;&lt;font size="3"&gt;two sessions I presented&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; last week at Tech-Ed North America 2011 are now available for on-demand online viewing:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Unintended Consequences of Security Lockdowns&lt;/strong&gt; (which got an &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/oldnewthing/archive/2011/04/19/10155453.aspx" target="_blank"&gt;&lt;font size="3"&gt;unexpected and appreciated plug&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt; from &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/oldnewthing/" target="_blank"&gt;&lt;font size="3"&gt;Raymond Chen&lt;/font&gt;&lt;/a&gt;&lt;font size="3"&gt;) is here:     &lt;br /&gt;&lt;/font&gt;&lt;a title="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/SIM304" href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/SIM304"&gt;&lt;font size="3"&gt;http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/SIM304&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;&lt;strong&gt;Sysinternals Primer: Autoruns, Disk2Vhd, ProcDump, BgInfo and AccessChk&lt;/strong&gt; is here:      &lt;br /&gt;&lt;/font&gt;&lt;a title="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL312" href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL312"&gt;&lt;font size="3"&gt;http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL312&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;I am pleased to say that both sessions received high marks from attendees.&amp;#160; Both were in the top 10%, and the Sysinternals session was in the top 3% and just missed being in the top 10 (out of 454 breakout sessions).&amp;#160; I really appreciated the many compliments that people wrote in the comments section of the evaluations, but my favorite was this one:&amp;#160; “Mark you need to let Andy's name be the same size as yours on the &lt;a href="http://oreilly.com/catalog/9780735656727/" target="_blank"&gt;book cover&lt;/a&gt;.”&amp;#160; (Yes.&amp;#160; “Andy’s”.&amp;#160; Nobody ever gets &lt;a href="http://blogs.technet.com/b/markrussinovich/" target="_blank"&gt;Mark Russinovich&lt;/a&gt;’s name wrong.&amp;#160; I’ve obviously got a long ways to go before I’m as famous as he is.)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;Speaking of Mark, he presented another excellent &lt;strong&gt;Case of the Unexplained&lt;/strong&gt; featuring all new material which you can view &lt;a href="http://channel9.msdn.com/Events/TechEd/NorthAmerica/2011/WCL304" target="_blank"&gt;here&lt;/a&gt;.&amp;#160; I particularly liked the part at about 1:11:40 when in reference to the Sysinternals Administrators Reference he said, “This book really exceeded my expectations in terms of the quality of the material that we got, largely because of Aaron’s dedication to it.”&amp;#160; Pretty good week. :)&lt;/font&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10168110" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Presentations/">Presentations</category></item><item><title>IEZoneAnalyzer updated</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/04/14/iezoneanalyzer-updated.aspx</link><pubDate>Thu, 14 Apr 2011 17:58:55 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10154058</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10154058</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/04/14/iezoneanalyzer-updated.aspx#comments</comments><description>&lt;p&gt;I just posted a major update to IEZoneAnalyzer, my IE security zone analysis and comparison&amp;nbsp;utility, over on the Microsoft FDCC/USGCB blog.&amp;nbsp; Lots of new features, including saving settings so they can be viewed and compared later and on other computers, and export to Excel.&amp;nbsp; See&amp;nbsp;&lt;a href="http://blogs.technet.com/b/fdcc/archive/2011/04/14/iezoneanalyzer-v3.aspx" title="that blog post"&gt;that blog post&lt;/a&gt; for screenshots and the download.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.technet.com/b/fdcc/archive/2011/04/14/iezoneanalyzer-v3.aspx"&gt;http://blogs.technet.com/b/fdcc/archive/2011/04/14/iezoneanalyzer-v3.aspx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10154058" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Security/">Security</category></item><item><title>The Case of the Mysterious Law Manager Startup Error</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/04/14/the-case-of-the-mysterious-law-manager-startup-error.aspx</link><pubDate>Thu, 14 Apr 2011 15:08:43 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10153948</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10153948</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/04/14/the-case-of-the-mysterious-law-manager-startup-error.aspx#comments</comments><description>&lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;&lt;strong&gt;Getting Law Manager v2.4 to run on Windows 7&lt;/strong&gt;&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1&gt;Overview&lt;/h1&gt;  &lt;p&gt;&lt;font size="2"&gt;Several of my customers run old versions (circa 2003) of a legal case management application called &lt;/font&gt;&lt;a href="http://www.bridge-way.com/products/matter-and-litigation-management/lawmanager.cfm"&gt;&lt;font size="2"&gt;Law Manager&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, since acquired by Bridgeway. These customers reported that their old versions of Law Manager “don’t work” on Windows 7 and that the vendor did not support running them on Windows 7. Normally, if the vendor of an incompatible app has a newer version that is compatible with Windows 7, we recommend upgrading to the new version. Sometimes, though, customers will choose for various reasons to try to continue using the version they have at least temporarily, even if it means that they will do so without vendor support. This article describes the troubleshooting and remediation steps I performed to get Law Manager working for one of those customers. The incompatibility turned out to be due to a very subtle change in a single registry value. Two different solutions to the problem are provided.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;This case describes troubleshooting and remediation for a specific version of Law Manager. The results may be the same for other legacy versions of Law Manager, but they would each need to be verified separately. Sysinternals &lt;/font&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897441"&gt;&lt;font size="2"&gt;SigCheck&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; with the &lt;strong&gt;-a&lt;/strong&gt; command line option reports the following version information for this customer’s copy:&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;C:\Program Files\Law Manager, Inc\LawManager.Pro\lm2000.exe:        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Verified: Unsigned         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; File date: 4:50 PM 10/6/2003         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Publisher: Law Manager, Inc.         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Description: LawManager.Pro         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Product: LawManager.Pro         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Version: 2.4 Service Pack 1 (204)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; File version: 2.4 Service Pack 1 (204)         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Strong Name: Unsigned         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Original Name: lm2000.exe         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Internal Name: lm2000.exe         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Copyright: Copyright ⌐ Law Manager, Inc 1985-2002         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Comments: leader in premier practice management software for large corporate legal departments, government agencies and multi-office law firms &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;h1&gt;The Diagnosis&lt;/h1&gt;  &lt;p&gt;&lt;font size="2"&gt;After installing Law Manager (with administrative rights), I ran Law Manager from the Start menu as a standard user. It displayed a terse error message and then exited when the dialog was dismissed:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7875.runtimeError_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Law Manager runtime error on Windows 7" border="0" alt="Law Manager runtime error on Windows 7" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7317.runtimeError_5F00_thumb.png" width="220" height="148" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;It turns out that this kind of error message is typical of runtime failures from Borland Delphi applications. As far as I can tell, when a Delphi app triggers an otherwise-unhandled exception, the outermost Delphi runtime code captures the exception, displays an error message like the one shown with an error code and a memory address, then exits. In Pascal and Delphi, error code 204 means “invalid pointer operation”. In addition to the Borland-style UI elements in a working version of Law Manager, I confirmed my suspicion that Law Manager is a Delphi application with the Sysinternals &lt;/font&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897439"&gt;&lt;font size="2"&gt;Strings&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; utility:&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="2" face="Courier New"&gt;strings -q lm2000.exe | findstr /i delp        &lt;br /&gt;        &lt;br /&gt;SOFTWARE\Borland\Delphi\RTL         &lt;br /&gt;Software\Borland\Delphi\Locales         &lt;br /&gt;Delphi Picture         &lt;br /&gt;Delphi Component         &lt;br /&gt;Delphi%.8X         &lt;br /&gt;Software\Developer Express\Delphi\Design Forms\         &lt;br /&gt;Software\Developer Express\Delphi\Design Forms\         &lt;br /&gt;&amp;#160;&amp;#160; | Compilation Flags: Win32, Production, TimerView, Delphi 6.0 &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2"&gt;To figure out what the app could be doing that would lead to failure, I turned to Sysinternals &lt;/font&gt;&lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb896645"&gt;&lt;font size="2"&gt;Process Monitor&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;, a.k.a. Procmon, the best troubleshooting tool in the universe (well, at least for that part of the universe that runs Microsoft Windows).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Here is a troubleshooting pattern I use all the time. I started Procmon, which began capturing details about all file system and registry events as well as many types of process and network events. When the error message appeared, I stopped the Procmon trace and dragged the crosshairs “Include Process From Window” icon from the Procmon toolbar to the error message. This feature applies a filter to the results so that Procmon displays only those events associated with the process that owns the window; in this case lm2000.exe, process ID 3600. The events of interest are then usually near the end of the trace, so I went to the end of the trace and worked back. One thing to note is that displaying an error dialog usually involves a number of registry accesses. If the Procmon trace has clues, they usually show up right before the events involved in the error message display.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;It took some digging, but the evidence turned up and can be seen in the following screenshot. The first event shown in the screenshot is a registry value read that appears to be related to COM component invocation. The retrieved value is a REG_EXPAND_SZ – a text string that can contain environment variables that need to be expanded before use: “%SystemRoot%\System32\hhctrl.ocx”. Two events later is an attempt to open a file system folder with the name “C:\Program Files\Law Manager, Inc\LawManager.Pro\%SystemRoot%\System32\”, which of course fails with “PATH NOT FOUND”. Evidently the program failed to expand the environment variable before calling a file system API with the returned data. The program probably also expected the API to succeed because the error and exit followed very quickly.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/8867.ProcmonMainScreen_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Bug evidence in Process Monitor" border="0" alt="Bug evidence in Process Monitor" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7701.ProcmonMainScreen_5F00_thumb.png" width="1028" height="183" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;(Click on the screenshots in this post to see the full resolution versions.)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;We can dig deeper into these two events by double-clicking each to open their Properties dialogs, shown below. Looking at the call stack of the registry read in the first screenshot, we see that lm2000.exe (frame 6) did not invoke a COM API but instead read the value directly by calling the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms724911(VS.85).aspx"&gt;&lt;font size="2"&gt;RegQueryValueExA&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; API (frame 5 – note that beginning with Windows 7 and Server 2008 R2 the registry APIs now live in kernel32 instead of advapi32). The file system access shown in the second screenshot occurred when lm2000.exe invoked the &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx"&gt;&lt;font size="2"&gt;FindFirstFileA&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; API (frame 14) which is used to search for file names matching a pattern. (Note that this core function is now exported from KernelBase.dll).&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/8171.ProcmonRegQueryValue_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="lm2000.exe invoking RegQueryValueExA" border="0" alt="lm2000.exe invoking RegQueryValueExA" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/8662.ProcmonRegQueryValue_5F00_thumb.png" width="352" height="404" /&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/5025.ProcmonFindFirstFile_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="lm2000.exe invoking FindFirstFileA" border="0" alt="lm2000.exe invoking FindFirstFileA" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/1715.ProcmonFindFirstFile_5F00_thumb.png" width="352" height="404" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Just for extra verification (and turbo-nerdiness) I ran lm2000.exe again, but this time in Windbg from the Debugging Tools for Windows. Here’s an annotated screenshot:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/2526.windbgAnnotated_5F00_2.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Annotated windbg output" border="0" alt="Annotated windbg output" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7382.windbgAnnotated_5F00_thumb.png" width="603" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;font size="2"&gt;“bp kernelbase!FindFirstFileA” sets a breakpoint at the entry point to the function we want to see; “g” is the “Go” command that lets the program run.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;The FindFirstFileA breakpoint has been hit; “kv 1” shows the top stack frame including parameters (arguments) passed to the function on the stack.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;The first value passed to &lt;/font&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa364418(VS.85).aspx"&gt;&lt;font size="2"&gt;FindFirstFileA&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; is the memory address 0x01b01011c and represents the file name or pattern to search for. “da 01b1011c” displays the data found at that address as an ANSI string, which turns out to be “%SystemRoot%\System32\hhctrl.ocx”, which is not a valid file name or pattern. Combined with the Procmon trace, it appears that because FindFirstFileA didn’t recognize the supplied path as an absolute path, it treated it as a relative path and appended it to the current directory.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;“bc 0” clears breakpoint #0, and “g” lets the program continue. It quickly hits a first-chance exception due to an access violation.&lt;/font&gt; &lt;/li&gt;    &lt;li&gt;&lt;font size="2"&gt;The problem is that the instruction pointer (eip) which identifies the next instruction to execute is pointing to address 0, which is invalid. That will always cause a crash.&lt;/font&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;font size="2"&gt;Why did this code work on Windows XP but fail on Windows 7? Let’s take a look at the registry value as it existed in Windows XP and compare it to Windows 7. The XP screenshot shows that the value had been a REG_SZ with the literal path to the file rather than a REG_EXPAND_SZ containing “%SystemRoot%” as it is in Windows 7. The change makes sense: literal paths like the one on XP need to be customized at installation time depending on where Windows is installed, while “%SystemRoot%\System32\hhctrl.ocx” is correct for all Windows instances.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/4670.regedit_2D00_XP.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="Reg value is REG_SZ on Windows XP" border="0" alt="Reg value is REG_SZ on Windows XP" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7701.regedit_2D00_XP_5F00_thumb.png" width="413" height="204" /&gt;&lt;/a&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/3365.regedit_2D00_win7_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Reg value is REG_EXPAND_SZ on Windows 7" border="0" alt="Reg value is REG_EXPAND_SZ on Windows 7" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/1234.regedit_2D00_win7_5F00_thumb.png" width="413" height="141" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h1&gt;Solution #1: Overriding the Registry Value&lt;/h1&gt;  &lt;p&gt;&lt;font size="2"&gt;One way to get Law Manager to work the way it did on Windows XP is to change the registry data back to the way it was on Windows XP. That, however, is not a good idea, and Windows will tell you so with an “access denied” if you try. Take a look at the permissions on that registry key:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/3630.regperms_2D00_win7_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Registry permissions on Windows 7, writable only by TrustedInstaller" border="0" alt="Registry permissions on Windows 7, writable only by TrustedInstaller" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/4135.regperms_2D00_win7_5F00_thumb.png" width="513" height="390" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;That’s right: even Administrators and System are granted Read-Only, just like standard users. Because of Windows Resource Protection, only the TrustedInstaller (a.k.a., “Windows Modules Installer”) service is granted Full Control on this key. Objects with permissions set this way belong to Windows and should not be modified except by Windows itself. (Of course, if you have administrative rights, you could take ownership of the resource, change its permissions and then make any changes to the resource you want. It is impossible to restrict what an administrator can do. Just be aware that just because you can doesn’t mean it’s a good idea or that you will have a supportable and serviceable instance of Windows when you’re done. Consider that “access denied” an unsubtle hint that you shouldn’t continue.)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;So my first idea was to take advantage of the fact that HKEY_CLASSES_ROOT is actually a merged view of HKEY_LOCAL_MACHINE\Software\Classes and HKEY_CURRENT_USER\Software\Classes. If a value exists under HKCU\Software\Classes, it takes precedence over a corresponding value in HKLM\Software\Classes. I exported the key from HKCR to a file called “fix-law-manager.reg”, opened it with Notepad, changed the beginning of the key name from “HKEY_CLASSES_ROOT” to “HKEY_CURRENT_USER\Software\Classes” and changed the default value from a REG_EXPAND_SZ specified in hexadecimal bytes to a REG_SZ with a literal path:&lt;/font&gt;&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font face="Courier New"&gt;Windows Registry Editor Version 5.00       &lt;br /&gt;        &lt;br /&gt;[HKEY_CURRENT_USER\Software\Classes\CLSID\{ADB880A6-D8FF-11CF-9377-00AA003B7A11}\InprocServer32]        &lt;br /&gt;@=&amp;quot;C:\\Windows\\System32\\hhctrl.ocx&amp;quot;        &lt;br /&gt;&amp;quot;ThreadingModel&amp;quot;=&amp;quot;Apartment&amp;quot; &lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;&lt;font size="2"&gt;Finally, I imported the edited file into the user’s HKCU with this command line: “reg import fix-law-manager.reg”. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/4520.hkcu_2D00_win7_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="After importing &amp;quot;override&amp;quot; in HKCU" border="0" alt="After importing &amp;quot;override&amp;quot; in HKCU" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/0334.hkcu_2D00_win7_5F00_thumb.png" width="584" height="229" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The fix appeared to work: when I started Law Manager again it got past the previous error and displayed a login dialog. (That was as far as I could test it myself without back end systems. The customer tested the application’s full functionality and found no further problems.)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/3652.LawManager_2D00_working_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Law Manager login dialog - app working" border="0" alt="Law Manager login dialog - app working" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/1488.LawManager_2D00_working_5F00_thumb.png" width="347" height="254" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;A Procmon trace captured during that test shows that the literal path is picked up from the HKCU side of HKCR, and hhctrl.ocx is then successfully found in the C:\Windows\System32 folder.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/5635.Procmon_2D00_withHKCUdata_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Procmon trace showing read from HKCU overriding HKLM setting" border="0" alt="Procmon trace showing read from HKCU overriding HKLM setting" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/3582.Procmon_2D00_withHKCUdata_5F00_thumb.png" width="1028" height="211" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;I was satisfied that I had found a solution: simply package “fix-law-manager.reg” so that it can be imported into the HKCU of every end user who uses Law Manager one time before they run Law Manager for the first time. It is a pretty simple fix that doesn’t involve breaking permissions on Windows-owned resources. There are some downsides, however:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;· The fix-law-manager.reg file needs to be imported by every end user who uses Law Manager prior to first use. If two users share a computer and both use Law Manager, both users need to import the file. Further, because HKCU\Software\Classes doesn’t roam, if an end user logs on to different machines and runs Law Manager, the registry file needs to be imported for that user on each of those computers.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;· The overriding of the global value in HKLM\Software\Classes affects all programs that the user runs. While it would seem that a minor change like this is unlikely to cause any problems, you could have said the same about the change from REG_SZ to REG_EXPAND_SZ.&lt;/font&gt;&lt;/p&gt;  &lt;h1&gt;Solution #2: Apply an Application Compatibility Shim&lt;/h1&gt;  &lt;p&gt;&lt;font size="2"&gt;I shared my great app compat sleuthing and my fabulously simple solution with &lt;/font&gt;&lt;a href="http://blogs.msdn.com/b/cjacks/"&gt;&lt;font size="2"&gt;Chris Jackson, The App Compat Guy&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt;. I don’t think he was impressed. All he said was, “Are you aware of the HandleRegExpandSzRegistryKeys shim? It’s less risky to target the fix at the particular app, since hhctrl is the HTML Help control, the universe of possible side-effects is smaller than just adding the key and perpetuating the use of a hard-coded Windows path.” Well, no, I wasn’t aware of that shim at all. It’s certainly not one of the most over-documented shims we have. I Bing’d it and found &lt;/font&gt;&lt;a href="http://technet.microsoft.com/en-us/library/cc722047(WS.10).aspx"&gt;&lt;font size="2"&gt;Installation Failure Issues&lt;/font&gt;&lt;/a&gt;&lt;font size="2"&gt; which lists twenty-six fixes (shims) with the symptoms they treat along with one-sentence descriptions. HandleRegExpandSzRegistryKeys is the last one on the page and says it is good for when “You cannot open the Readme.txt file.” However, if I had read and remembered every page of TechNet documentation written since Windows Vista shipped, I would have remembered this valuable description: “Modifies the RegQueryValueEx function of the REG_EXPAND_SZ registry keys so that it automatically expands the environment strings.” That is exactly what we need. Apply this shim to Law Manager so that whenever it reads a REG_EXPAND_SZ from the registry, the shim will expand any environment variables it finds before returning the data to the application.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Note that shims do not modify the executable image. When an application is configured to have shims applied to it, Windows loads one or more additional DLLs into the process’ address space and patches portions of memory to intercept API calls so that the shim DLL can manipulate incoming or outgoing data or change other results. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;How do we configure this shim? Here is the step-by-step with lots of screenshots. Install the Application Compatibility Toolkit (ACT) v5.6, then run Compatibility Administrator (32-bit). Select the new custom database (selected by default) and click the “Fix” toolbar icon:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6403.compat_2D00_00_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6712.compat_2D00_00_5F00_thumb.png" width="644" height="468" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Enter the name and vendor of the program to be shimmed, browse to the file location to identify the executable image, and click Next:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6607.compat_2D00_01_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6114.compat_2D00_01_5F00_thumb.png" width="404" height="360" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;We won’t use any compatibility modes, so click Next without selecting any:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/0003.compat_2D00_02_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/2475.compat_2D00_02_5F00_thumb.png" width="404" height="359" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Find and select the HandleRegExpandSzRegistryKeys compatibility fix. No parameters are needed this time. Because the call stack showed that lm2000.exe calls RegQueryValueEx directly, we don’t need to configure other calling modules to be fixed up. (See in the screenshot that the tooltip text says, “Applies to: Windows 95, Windows 98”? Yeah, that’s helpful. And a bug.)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/5102.compat_2D00_03_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7245.compat_2D00_03_5F00_thumb.png" width="404" height="359" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;On the Matching Information page, just accept the provided defaults and click Finish.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7762.compat_2D00_04_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/5706.compat_2D00_04_5F00_thumb.png" width="404" height="359" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;We now have a fix prepared. Click Save in the Compatibility Administrator toolbar:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6403.compat_2D00_05_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/8053.compat_2D00_05_5F00_thumb.png" width="644" height="428" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Give the new shim database a display name (such as “Law Manager”), and save it to a file location, such as to LawManager.sdb on your desktop.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/4520.compat_2D00_06_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7268.compat_2D00_06_5F00_thumb.png" width="404" height="186" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;To install the new shim database on the current computer, right-click the custom database (the label next to the big oil barrel) and choose Install. This is the easiest way to install a shim database on a test system where you have Compatibility Administrator installed. To install it in an unattended fashion – such as in an automated Windows image build as an MDT task sequence, in a computer startup script configured through Group Policy, or incorporated into the application’s installation – use the Sdbinst.exe program that ships in Windows. (For example, “sdbinst.exe -q &lt;a href="file://\\server\sysvol\shims\LawManager.sdb"&gt;\\server\sysvol\shims\LawManager.sdb&lt;/a&gt;”.)&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/8865.compat_2D00_07_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/4645.compat_2D00_07_5F00_thumb.png" width="644" height="428" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;We now have a fix prepared and installed. As shown in the following screenshot, when Windows loads an executable image called “lm2000.exe” that has a binary file and product version of 2.4.204.1, text product and file version of “2.4 Service Pack 1 (204)”, a company name of “Law Manager, Inc.” and a product name of “LawManager.Pro” in its version resource information, Windows will apply the HandlRegExpandSzRegistryKeys fix to it:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6303.compat_2D00_08_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Shimming with Compatibility Administrator" border="0" alt="Shimming with Compatibility Administrator" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/7382.compat_2D00_08_5F00_thumb.png" width="644" height="428" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;After removing my previous HKCU registry edit, I ran Law Manager with the shim configured while monitoring with Procmon. Again, it ran successfully to the login dialog. Note the difference in the Procmon results. The HKCU\Software\Classes read failed with “Name not found”, followed by a successful read from the corresponding HKCR key. This is a very common pattern in Procmon traces. (In Procmon, HKCR refers to the global HKLM\Software\Classes.) At the low level that Procmon captured the RegQueryValueEx event, it shows that the value was still indeed a REG_EXPAND_SZ with an environment variable:&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/5238.Procmon_2D00_withShimInstalled_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Procmon trace showing evidence of shim" border="0" alt="Procmon trace showing evidence of shim" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/2677.Procmon_2D00_withShimInstalled_5F00_thumb.png" width="1028" height="210" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;But opening that event’s Properties, you can see that the lm2000.exe code that had invoked RegQueryValueEx directly has now been redirected through AcLayers.dll, which expands the environment variables in the text to return to lm2000.exe.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/1513.Procmon_2D00_callstack_2D00_withShimInstalled_5F00_2.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="Procmon callstack with shim" border="0" alt="Procmon callstack with shim" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/1018.Procmon_2D00_callstack_2D00_withShimInstalled_5F00_thumb.png" width="422" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10153948" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category></item><item><title>LUA Buglight 2.1.1 with support for Win7/2008R2 SP1</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/23/lua-buglight-2-1-1-with-support-for-win7-2008r2-sp1.aspx</link><pubDate>Wed, 23 Mar 2011 03:24:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10144645</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10144645</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/23/lua-buglight-2-1-1-with-support-for-win7-2008r2-sp1.aspx#comments</comments><description>&lt;p&gt;LUA Buglight 2.1.1 is attached to this blog post and replaces v2.1.&amp;nbsp; It adds support for Windows 7 SP1 and Windows Server 2008 R2 SP1.&amp;nbsp; It also fixes a localization bug.&lt;/p&gt;
&lt;p&gt;Now that I've (pretty much) finished work on the &lt;a target="_blank" href="http://oreilly.com/catalog/0790145316974/" title="Windows Sysinternals Administrators Reference"&gt;Windows Sysinternals Administrators Reference&lt;/a&gt;, maybe I can find time to write documentation for LUA Buglight! :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10144645" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-10-14-46-45/LuaBuglight.zip" length="1418709" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Non_2D00_admin/">Non-admin</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Fixing+LUA+Bugs/">Fixing LUA Bugs</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/LUA+Buglight/">LUA Buglight</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category></item><item><title>Unintended Consequences and Sysinternals at Tech-Ed North America 2011</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/10/unintended-consequences-and-sysinternals-at-tech-ed-north-america-2011.aspx</link><pubDate>Thu, 10 Mar 2011 06:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10139075</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10139075</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/10/unintended-consequences-and-sysinternals-at-tech-ed-north-america-2011.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;"&gt;I'm presenting a couple of sessions at &lt;/span&gt;&lt;a href="http://northamerica.msteched.com/"&gt;&lt;span style="font-size: small;"&gt;Tech-Ed in Atlanta (May 16-19, 2011)&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small;"&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;The first is "&lt;strong&gt;Unintended Consequences of Security Lockdowns&lt;/strong&gt;", which was very highly rated when I presented it last month at TechReady, Microsoft's internal training event.&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;&lt;span style="font-size: small;"&gt;Security-conscious organizations often lock down their systems based on prescriptive guidance from Microsoft, US Federal government agencies or other security organizations. Sometimes these settings can lead to unpleasant surprises and unexpected side effects. This session will describe and demonstrate some of the common issues that can arise, and whether and how those settings actually help or hurt. Is there benefit to not granting Administrators the &amp;ldquo;Debug&amp;rdquo; privilege? Does &amp;ldquo;Hide mechanisms to remove zone information&amp;rdquo; break anything? Is the &amp;ldquo;Require trusted path for credential entry&amp;rdquo; setting worth the inconvenience? Come see!&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;It's got several eye-opening demos, including a couple that led to changes in Microsoft's and others' security guidance.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;The second session is "&lt;strong&gt;Sysinternals Primer: Autoruns, Disk2vhd, ProcDump, BgInfo and AccessChk&lt;/strong&gt;":&lt;/span&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;&lt;em&gt;The Sysinternals utilities are vital tools for any computer professional on the Windows platform. Mark Russinovich's popular "Case Of The Unexplained" demonstrates some of their capabilities in advanced troubleshooting scenarios. This complementary tutorial session focuses primarily on the utilities themselves, giving you tips and techniques for using their full functionality for troubleshooting and systems management. This session follows the same format as last year&amp;rsquo;s highly-rated delivery &lt;/em&gt;(*)&lt;em&gt;, and covers a different set of the most useful Sysinternals tools.&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;(*) &lt;/span&gt;&lt;a href="http://www.msteched.com/2010/NorthAmerica/WCL314"&gt;&lt;span style="font-size: small;"&gt;Last year's session&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: small;"&gt;, which I delivered with Tim Reckmeyer, covered Process Explorer, Process Monitor and PsExec.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;"&gt;I guess you might be wondering why I'm delivering a session on Sysinternals utilities. That would be a good question, because I see now that I haven't actually blogged about it yet: I am the co-author with Mark Russinovich of the upcoming Windows Sysinternals Administrators Reference on Microsoft Press, so I've been getting to know the Sysinternals utilities &lt;em&gt;really &lt;/em&gt;well :). More info on the book soon.&amp;nbsp; In the meantime, here is the updated cover:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/6518.9780735656727x_5F00_2.jpg"&gt;&lt;img height="484" width="398" src="http://blogs.msdn.com/cfs-file.ashx/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26-metablogapi/3858.9780735656727x_5F00_thumb.jpg" alt="656727.indd" border="0" title="656727.indd" style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 10px 10px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10139075" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Security/">Security</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Sysinternals/">Sysinternals</category></item><item><title>Disabling User Account Control (UAC) on Windows Server</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/04/disabling-user-account-control-uac-on-windows-server.aspx</link><pubDate>Fri, 04 Mar 2011 19:16:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10137129</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10137129</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/03/04/disabling-user-account-control-uac-on-windows-server.aspx#comments</comments><description>&lt;p style="line-height: 16pt; margin: 24pt 0in 0pt;"&gt;&lt;em&gt;&lt;span style="font-family: Cambria; font-size: medium;"&gt;&lt;span style="color: #365f91;"&gt;[Update May 17, 2011: this blog post has been republished as &lt;a href="http://support.microsoft.com/kb/2526083"&gt;Microsoft Knowledge Base article 2526083&lt;/a&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h1 style="line-height: 16pt; margin: 24pt 0in 0pt;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="color: #365f91; font-size: 14pt;"&gt;Applies To&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Windows Server 2008 (all editions except Server Core)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Windows Server 2008 R2 (all editions except Server Core)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height: 16pt; margin: 24pt 0in 0pt;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="color: #365f91; font-size: 14pt;"&gt;Summary&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Under certain constrained circumstances, disabling User Account Control (UAC) on Windows Server can be an acceptable and recommended practice. These circumstances arise only when both of the following are true:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: 11pt;"&gt;Only Administrators are allowed to log on to the Windows Server interactively at the console or through Remote Desktop services.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: 11pt;"&gt;Administrators log on to the Windows Server only to perform legitimate system administrative functions on the Server.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;If either of the above is not true, then UAC should remain enabled. For example, if the Server is configured with the Remote Desktop Services role so that non-administrative users can log on to the Server to run applications, UAC should remain enabled. Similarly, UAC should also remain enabled if administrators run risky applications on the Server such as web browsers, email or instant messaging clients, or perform other operations that should be performed from a client operating system such as Windows 7.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Note that this guidance applies only to Windows Server operating systems such as Windows Server 2008 and Windows Server 2008 R2. UAC should always remain enabled on client operating systems such as Windows Vista and Windows 7.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Note also that UAC is always disabled on Windows Server 2008 R2 Server Core and should always be kept disabled on Windows Server 2008 Server Core. A hotfix is available for Windows Server 2008 Server Core (KB 969371) to prevent UAC from being enabled accidentally.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h1 style="line-height: 16pt; margin: 24pt 0in 0pt;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="color: #365f91; font-size: 14pt;"&gt;More Information&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;User Account Control (UAC) was introduced in Windows Vista and enhanced in Windows 7 to help Windows users move toward using standard user rights by default. UAC includes several technologies to achieve this:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 11pt;"&gt;File and Registry Virtualization&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 11pt;"&gt;. When a &amp;ldquo;legacy&amp;rdquo; application tries to write to protected areas of the file system or registry, Windows silently and transparently redirects the access to a portion of the file system or registry that the user is allowed to modify. This enables many applications that required administrative rights on earlier versions of Windows to run successfully with only standard user rights on Windows Vista and Windows 7.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 11pt;"&gt;Same-desktop Elevation&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 11pt;"&gt;. Elevation allows an authorized user to run a program with greater rights than those of the interactive desktop user. Combined with UAC&amp;rsquo;s &amp;ldquo;Filtered Token&amp;rdquo; feature, this allows administrators to run all programs with standard user rights by default and to elevate only those programs that require administrative rights with the same user account. (This feature is also known as &amp;ldquo;Admin Approval Mode&amp;rdquo;.) Programs can also be launched with elevated rights under a different user account, so that an administrator can perform administrative tasks on a standard user&amp;rsquo;s desktop.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 11pt;"&gt;Filtered Token&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 11pt;"&gt;. When a user with administrative or other powerful privileges or group memberships logs on, Windows creates two access tokens representing the user account. One has all the user&amp;rsquo;s group memberships and privileges, while the &amp;ldquo;filtered&amp;rdquo; token represents the user with the equivalent of standard user rights and is used to run the user&amp;rsquo;s programs by default. The unfiltered token is associated only with elevated programs. An account that is a member of the Administrators group and gets a filtered token at logon is often called a &amp;ldquo;Protected Administrator&amp;rdquo; account.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 11pt;"&gt;User Interface Privilege Isolation (UIPI)&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 11pt;"&gt;. UIPI prevents a lower-privileged program from sending window messages such as synthetic mouse or keyboard events to a window belonging to a higher-privileged process and thus controlling it.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 11pt;"&gt;Protected Mode Internet Explorer (PMIE)&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 11pt;"&gt;. PMIE is a defense-in-depth feature in which Internet Explorer operates in low-privileged &amp;ldquo;Protected Mode&amp;rdquo; and cannot write to most areas of the file system or registry. Protected Mode is &amp;ldquo;on&amp;rdquo; by default when browsing sites in the Internet or Restricted Sites zones. PMIE makes it more difficult for malware that infects a running instance of IE to change the user&amp;rsquo;s settings, such as by configuring itself to start every time the user logs on. (PMIE is not actually part of UAC but depends on UAC features such as UIPI.)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;b style="mso-bidi-font-weight: normal;"&gt;&lt;span style="font-size: 11pt;"&gt;Installer Detection&lt;/span&gt;&lt;/b&gt;&lt;span style="font-size: 11pt;"&gt;. When an interactive user running with standard user rights starts a program that Windows heuristically determines is likely to be a legacy installation program, Windows proactively prompts the user for elevation, rather than allow the program to run with standard user rights and possibly fail. Note that if the interactive user does not have administrative credentials, the user will not be able to run the program.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;In Local Security Policy | Security Settings | Local Policies | Security Options, disabling the policy named &amp;ldquo;User Account Control: Run all administrators in Admin Approval Mode&amp;rdquo; disables all the UAC features described above. Legacy applications with standard user rights that expect to write to protected folders or registry keys will fail. Filtered tokens are not created, and all programs run with the logged on user&amp;rsquo;s full rights. This includes Internet Explorer, as Protected Mode is &amp;ldquo;off&amp;rdquo; for all security zones.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;One of the common misconceptions about UAC &amp;ndash; and same-desktop elevation in particular &amp;ndash; is that it prevents malware from being installed or from gaining administrative rights. First, malware can be written not to require administrative rights, and to write only to areas in the user&amp;rsquo;s profile. More importantly, UAC&amp;rsquo;s same-desktop elevation is not a &lt;i style="mso-bidi-font-style: normal;"&gt;security boundary&lt;/i&gt; and can be hijacked by unprivileged software running on the same desktop. Same-desktop elevation should be considered a convenience feature, and for security purposes &amp;ldquo;Protected Administrator&amp;rdquo; should be considered equivalent to &amp;ldquo;Administrator&amp;rdquo;. By contrast, logging in or Fast User Switching to a different session with an administrator account involves a security boundary between it and the standard user session. (See the References section for more information about security boundaries.)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;The purpose of the Protected Administrator account on end user client operating systems (Windows Vista and Windows 7) is to encourage developers to write their applications to require only standard user rights while enabling as many applications that share state between administrative components and standard user components to continue working. The stated goal and expectation is that over time end users would see few if any elevation prompts, as the programs they run should never require administrative rights. This becomes increasingly necessary as more enterprises adopt a model in which their end users log on as standard users and do not have credentials for administrative accounts with which to allow elevations.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;However, for a Windows Server on which the sole reason for interactive logon is to administer the system, the goal of fewer elevation prompts is neither feasible nor desirable. System administrative tools legitimately require administrative rights. When all the administrative user&amp;rsquo;s tasks require administrative rights and each task could trigger an elevation prompt, the prompts are only a hindrance to productivity. In this context, they do not and cannot promote the goal of encouraging development of applications that require standard user rights. Nor do they improve security posture. Instead they simply encourage users to click through dialog boxes without reading them.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Note that this guidance applies only to well-managed Servers on which only administrative users are allowed to log on interactively or through Remote Desktop services, and they do so only to perform legitimate administrative functions. If they run risky applications such as web browsers, email or instant messaging clients, or perform other operations that should be performed from a client operating system, then the Server should be considered equivalent to a client system and UAC should remain enabled as a defense-in-depth measure.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Further, if standard users log on to the Server at the console or through Remote Desktop services to run applications, including web browsers, UAC should remain enabled to support file and registry virtualization as well as Protected Mode Internet Explorer.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;Another option to avoid elevation prompts without disabling UAC is to set the security policy, &amp;ldquo;User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode&amp;rdquo; to &amp;ldquo;Elevate without prompting.&amp;rdquo; With this setting, elevation requests are silently approved if the logged-on user is a member of the Administrators group. This also leaves PMIE and other UAC features enabled. However, not all operations that require administrative rights request elevation. This can result in a situation in which some of the user&amp;rsquo;s programs are elevated and some are not, often with no way to distinguish between them. For example, most console utilities that require administrative rights expect to be launched from an already-elevated Command Prompt or other elevated program. Such utilities simply fail when launched from a non-elevated Command Prompt.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="line-height: 15pt; margin: 10pt 0in 0pt; padding: 0px;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="color: #4f81bd; font-size: 13pt;"&gt;Additional impact of disabling UAC&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p class="MsoListParagraphCxSpFirst" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: 11pt;"&gt;With UAC disabled, Windows Explorer continues to display UAC &amp;ldquo;shield&amp;rdquo; icons for items that require elevation and to include &amp;ldquo;Run as administrator&amp;rdquo; in the context menus of applications and application shortcuts. Because the UAC elevation mechanism is disabled, these have no effect, and applications run in the same security context as the logged-on user.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpMiddle" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 0pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: 11pt;"&gt;With UAC enabled, when the console utility Runas.exe is used to launch a program as a user that is subject to token filtering, the launched program runs with the user&amp;rsquo;s filtered token. With UAC disabled, the launched program runs with the user&amp;rsquo;s full token.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoListParagraphCxSpLast" style="line-height: 13pt; text-indent: -0.25in; margin: 0in 0in 10pt 0.5in; mso-list: l0 level1 lfo1;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="mso-fareast-font-family: symbol; mso-bidi-font-family: symbol;"&gt;&lt;span style="mso-list: ignore;"&gt;&lt;span style="font-family: Symbol;"&gt;&lt;span style="font-size: 11pt;"&gt;&amp;middot;&lt;/span&gt;&lt;/span&gt;&lt;span style="line-height: normal;"&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="font-size: 7pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="font-size: 11pt;"&gt;With UAC enabled, local accounts cannot be used for remote administration over network interfaces other than Remote Desktop (e.g., via NET USE or IIS&amp;rsquo; Windows authentication). A local account that authenticates over such an interface gets only the privileges granted to the account&amp;rsquo;s filtered token. With UAC disabled, this restriction is removed. (This feature and a configuration setting to remove it are described in Microsoft KB article 951016.)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h2 style="line-height: 15pt; margin: 10pt 0in 0pt; padding: 0px;"&gt;&lt;span style="font-family: Cambria;"&gt;&lt;span style="color: #4f81bd; font-size: 13pt;"&gt;References&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-size: 11pt;"&gt;Inside Windows Vista User Account Control&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 11pt;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/magazine/2007.06.uac.aspx"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #0000ff; font-size: 11pt;"&gt;http://technet.microsoft.com/en-us/magazine/2007.06.uac.aspx&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-size: 11pt;"&gt;Inside Windows 7 User Account Control&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 11pt;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://technet.microsoft.com/en-us/magazine/2009.07.uac.aspx"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #0000ff; font-size: 11pt;"&gt;http://technet.microsoft.com/en-us/magazine/2009.07.uac.aspx&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000;"&gt;&lt;span style="font-size: 11pt;"&gt;PsExec, User Account Control and Security Boundaries&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 11pt;"&gt; &lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://blogs.technet.com/b/markrussinovich/archive/2007/02/12/638372.aspx"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #0000ff; font-size: 11pt;"&gt;http://blogs.technet.com/b/markrussinovich/archive/2007/02/12/638372.aspx&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="line-height: 13pt; margin: 0in 0in 10pt;"&gt;&lt;span style="font-family: Calibri;"&gt;&lt;span style="color: #000000; font-size: 11pt;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10137129" width="1" height="1"&gt;</description></item><item><title>TechEd sessions on Application Compatibility, Sysinternals utilities, and more</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2011/01/21/teched-sessions-on-application-compatibility-sysinternals-utilities-and-more.aspx</link><pubDate>Fri, 21 Jan 2011 07:27:49 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10118562</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>3</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10118562</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2011/01/21/teched-sessions-on-application-compatibility-sysinternals-utilities-and-more.aspx#comments</comments><description>&lt;p&gt;TechEd sessions are available for on-demand viewing.&amp;nbsp; Here are some recent ones&amp;nbsp;that &lt;a href="http://blogs.msdn.com/b/cjacks/"&gt;Chris Jackson&lt;/a&gt; (The App Compat Guy)&amp;nbsp;and I have delivered recently on Application Compatibility and more...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;strong&gt;What Everyone Should Know about Application Compatibility&lt;br /&gt;&lt;/strong&gt;(Aaron Margosis &amp;amp; Chris Jackson)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/NorthAmerica/WCL204"&gt;http://www.msteched.com/2010/NorthAmerica/WCL204&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Inside the Application Compatibility Toolkit 5.6: Finding, Testing and Fixing Applications on Windows 7&lt;br /&gt;&lt;/strong&gt;(Chris Jackson)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/Europe/WCL404"&gt;http://www.msteched.com/2010/Europe/WCL404&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Black Art of Fixing Busted Applications Part 1: Win32 Application Compatibility&lt;br /&gt;&lt;/strong&gt;(Chris Jackson)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/Europe/WCL302"&gt;http://www.msteched.com/2010/Europe/WCL302&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The Black Art of Fixing Busted Applications Part 2: Web Application Compatibility&lt;br /&gt;&lt;/strong&gt;(Chris Jackson)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/Europe/WCL303"&gt;http://www.msteched.com/2010/Europe/WCL303&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What You Need to Know about Migrating from Internet Explorer 6 to Internet Explorer 8&lt;br /&gt;&lt;/strong&gt;(Chris Jackson)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/Europe/WCL315"&gt;http://www.msteched.com/2010/Europe/WCL315&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Not for the Faint of Heart: Hard Core App Compat Debugging&lt;br /&gt;&lt;/strong&gt;(Chris Jackson)&lt;br /&gt;&lt;a href="http://www.msteched.com/2009/NorthAmerica/WCL401"&gt;http://www.msteched.com/2009/NorthAmerica/WCL401&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Case of the App Compat Bug&lt;br /&gt;&lt;/strong&gt;(Aaron Margosis)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/NorthAmerica/WCL301"&gt;http://www.msteched.com/2010/NorthAmerica/WCL301&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Aaron's Group Policy and Security Utilities &lt;/strong&gt;(this one's about my &lt;a href="http://blogs.technet.com/b/fdcc/archive/2008/05/07/lgpo-utilities.aspx"&gt;Local Group Policy utilities&lt;/a&gt; and &lt;a href="http://blogs.technet.com/b/fdcc/archive/2009/11/07/viewing-and-comparing-ie-security-zone-settings-enhanced.aspx"&gt;IEZoneAnalyzer&lt;/a&gt;)&lt;br /&gt;(Aaron Margosis)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/Europe/WCL324"&gt;http://www.msteched.com/2010/Europe/WCL324&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Windows Sysinternals Primer: Process Explorer, Process Monitor, and PsExec&lt;br /&gt;&lt;/strong&gt;(Aaron Margosis &amp;amp; Tim Reckmeyer)&lt;br /&gt;&lt;a href="http://www.msteched.com/2010/NorthAmerica/WCL314"&gt;http://www.msteched.com/2010/NorthAmerica/WCL314&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10118562" width="1" height="1"&gt;</description></item><item><title>Adobe Reader X</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2010/11/29/adobe-reader-x.aspx</link><pubDate>Mon, 29 Nov 2010 17:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10097865</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10097865</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2010/11/29/adobe-reader-x.aspx#comments</comments><description>&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;Many of our customers make Adobe Reader part of their standard desktop image, or at least have it on the majority of their systems.&amp;nbsp; Because of its ubiquity, Reader has become a major target for cybercriminals, with a scary increase in the number of exploited zero-day vulnerabilities over the last few years.&amp;nbsp; When it&amp;rsquo;s Reader running on Windows that gets attacked (as it often is), &lt;i&gt;our&lt;/i&gt; customers suffer.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;Adobe has just released a major upgrade, Adobe Reader X, that should go a long way toward mitigating these attacks.&amp;nbsp; Reader X incorporates a &amp;ldquo;Protected Mode&amp;rdquo; sandbox, not unlike the Protected Mode we implemented in Internet Explorer 7 and 8, in the Microsoft Office Isolated Conversion Environment (MOICE), and in Office 2010&amp;rsquo;s Protected View.&amp;nbsp; Reader X&amp;rsquo;s Protected Mode should make it substantially harder to mount successful attacks against Windows computers via Adobe Reader.&amp;nbsp; That&amp;rsquo;s good for our customers.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;If you use&amp;nbsp;Adobe Reader, you should begin evaluating Reader X right away.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px;"&gt;&lt;span style="font-family: Calibri, sans-serif; font-size: x-small;"&gt;&lt;span style="font-size: 11pt;"&gt;&lt;span&gt;This Adobe blog post announcing the release of Reader X includes links to additional information about its Protected Mode: &lt;a href="http://blogs.adobe.com/asset/2010/11/adobe-reader-x-is-here.html"&gt;http://blogs.adobe.com/asset/2010/11/adobe-reader-x-is-here.html&lt;/a&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10097865" width="1" height="1"&gt;</description></item><item><title>LUA Buglight tips:  opening a report file</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2010/10/02/lua-buglight-tips-opening-a-report-file.aspx</link><pubDate>Sat, 02 Oct 2010 05:05:21 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10070590</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10070590</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2010/10/02/lua-buglight-tips-opening-a-report-file.aspx#comments</comments><description>&lt;p&gt;I wish I had the time to write up&amp;nbsp;proper documentation for &lt;a target="_blank" href="http://blogs.msdn.com/b/aaron_margosis/archive/2009/11/03/lua-buglight-2-1-released.aspx" title="LUA Buglight"&gt;LUA Buglight&lt;/a&gt;, the utility I wrote that identifies admin-rights issues in desktop applications.&amp;nbsp; LUA Buglight is one of many "spare time" projects I work on, and for the past year and a half or so, it, like pretty much all my other "spare time" projects, has had to take a back seat to my taking over co-authorship of the &lt;a target="_blank" href="http://www.microsoft.com/MSPress/books/13439.aspx" title="Sysinternals Administrators Reference"&gt;Sysinternals Administrators Reference&lt;/a&gt;, working with &lt;a target="_blank" href="http://blogs.technet.com/b/markrussinovich/" title="Mark Russinovich"&gt;Mark Russinovich&lt;/a&gt;.&amp;nbsp; That "spare time" project has also consumed all my vacations.&amp;nbsp; It's taking a long time because I'm &lt;em&gt;very &lt;/em&gt;detail-oriented and am making sure to really get it all right.&amp;nbsp; You're going to like this book.&amp;nbsp; (Check out that link -- it references both of the other co-authors who tried and didn't survive.&amp;nbsp; The third co-author is the charm.)&lt;/p&gt;
&lt;p&gt;Anyway, no time for proper LUA Buglight documentation, but here's a tip.&amp;nbsp; Say you have a LUA Buglight report file (extension .xml) and you want to view its contents.&amp;nbsp; You can start up LuaBuglight.exe, then open the Reporter by choosing "Run LUA Buglight Reporter" from the Tools menu, then File | Open Report File from the Reporter's menu, and pick a file.&amp;nbsp; OR... just specify the file you want to open on the LuaBuglight.exe command line:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Luabuglight.exe C:\Users\Abby\Documents\LuaBugLogs\MyReportFile.xml&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;To start the LUA Buglight Reporter directly but without an initial file, run LuaBuglight.exe with the /Reporter option:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: courier new,courier;"&gt;Luabuglight.exe /reporter&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Finally,&amp;nbsp;you can&amp;nbsp;right-click a LUA Buglight report file, choose Open With, and browse to find LuaBuglight.exe.&amp;nbsp; From that point forward, LuaBuglight.exe will appear on the "Open With" context menu for XML files, as shown here:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blogs.msdn.com/resized-image.ashx/__size/709x381/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-37-26/2112.BuglightOpenWith.png" border="0" /&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10070590" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Non_2D00_admin/">Non-admin</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Fixing+LUA+Bugs/">Fixing LUA Bugs</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/LUA+Buglight/">LUA Buglight</category></item><item><title>Aaron Margosis @ Tech*Ed North America 2010</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2010/06/05/aaron-margosis-tech-ed-north-america-2010.aspx</link><pubDate>Sat, 05 Jun 2010 15:43:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10020418</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=10020418</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2010/06/05/aaron-margosis-tech-ed-north-america-2010.aspx#comments</comments><description>&lt;p&gt;Kind of late to be posting this, but better late than never.&amp;nbsp; I'm presenting three sessions at &lt;a target="_blank" href="http://northamerica.msteched.com/" title="Tech*Ed in New Orleans "&gt;Tech*Ed in New Orleans&lt;/a&gt; this week:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;WCL204:&amp;nbsp; &lt;strong&gt;What EVERYONE Should Know About Application Compatibility&lt;/strong&gt; (co-presenting with &lt;a target="_blank" href="http://blogs.msdn.com/b/cjacks" title="Chris Jackson"&gt;Chris Jackson&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;WCL301:&amp;nbsp; &lt;strong&gt;Case of the App Compat Bug&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;WCL314:&amp;nbsp; &lt;strong&gt;Windows Sysinternals Primer: Process Explorer, Process Monitor, and More &lt;/strong&gt;(co-presenting with Tim Reckmeyer)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See y'all there!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10020418" width="1" height="1"&gt;</description></item><item><title>Machine SIDs and Domain SIDs</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2009/11/05/machine-sids-and-domain-sids.aspx</link><pubDate>Thu, 05 Nov 2009 13:37:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9917978</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>8</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9917978</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2009/11/05/machine-sids-and-domain-sids.aspx#comments</comments><description>&lt;p&gt;Microsoft Technical Fellow Mark Russinovich’s recent post “&lt;a href="http://blogs.technet.com/markrussinovich/archive/2009/11/03/3291024.aspx" target="_blank"&gt;The Machine SID Duplication Myth&lt;/a&gt;” confused many readers who didn’t understand the distinction between the two independent SIDs that belong to a domain-joined computer.&amp;#160; I’ll take a crack at trying to clarify that.&lt;/p&gt;  &lt;p&gt;Machine and domain SIDs consist of a base SID and a Relative ID (RID) that is appended to the base SID.&amp;#160; Think of the base SID by itself as identifying an authority within which accounts and groups can be defined.&amp;#160; A computer is an authority within which local accounts and groups are defined.&amp;#160; The computer has a machine SID, and the local accounts and groups have SIDs consisting of that machine SID plus a RID.&amp;#160; For example:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="874"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="262"&gt;Machine SID for computer DEMOSYSTEM&lt;/td&gt;        &lt;td valign="top" width="610"&gt;S-1-5-21-3419697060-3810377854-678604692&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;DEMOSYSTEM\Administrator&lt;/td&gt;        &lt;td valign="top" width="610"&gt;S-1-5-21-3419697060-3810377854-678604692-500&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;DEMOSYSTEM\Guest&lt;/td&gt;        &lt;td valign="top" width="610"&gt;S-1-5-21-3419697060-3810377854-678604692-501&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;DEMOSYSTEM\CustomAccount1&lt;/td&gt;        &lt;td valign="top" width="610"&gt;S-1-5-21-3419697060-3810377854-678604692-1000&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="262"&gt;DEMOSYSTEM\CustomAccount2&lt;/td&gt;        &lt;td valign="top" width="610"&gt;S-1-5-21-3419697060-3810377854-678604692-1001&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;SIDs (not names) are what are stored in access tokens associated with running code and in security descriptors associated with securable objects, and are what are compared by the security subsystem when performing access checks.&lt;/p&gt;  &lt;p&gt;On a workgroup system, local accounts and groups are all there are.&amp;#160; Mark’s assertion is that authentication to a remote system using a local account requires a user name and password known to the remote system, and that SIDs are not used.&amp;#160; The only way anything resembling single sign on happens with local accounts is that if the remote system has the same user name and password that the caller is using.&amp;#160; SIDs are not transmitted and are not used for remote authentication.&lt;/p&gt;  &lt;p&gt;If the computer is joined to a domain, then another SID comes into play.&amp;#160; The computer still has its own machine SID and its own local accounts and groups.&amp;#160; But it is also a member of a domain, and so it has a SID representing its computer account within that domain.&amp;#160; The domain is an authority within which accounts and groups (and other entities) can be defined – including computer accounts:&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="2" width="875"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="312"&gt;SID for domain BIGDOMAIN&lt;/td&gt;        &lt;td valign="top" width="561"&gt;S-1-5-21-124525095-708259637-1543119021&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="312"&gt;BIGDOMAIN\DEMOSYSTEM$ (computer account)&lt;/td&gt;        &lt;td valign="top" width="561"&gt;S-1-5-21-124525095-708259637-1543119021-937822&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="312"&gt;BIGDOMAIN\JOHNSMITH&amp;#160; (user account)&lt;/td&gt;        &lt;td valign="top" width="561"&gt;S-1-5-21-124525095-708259637-1543119021-20937&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  &lt;p&gt;DEMOSYSTEM now has two separate SIDs:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;the machine SID which identifies it (locally) as an authority within which accounts and groups are defined (first row in the first table above); and &lt;/li&gt;    &lt;li&gt;the computer account SID within the BIGDOMAIN domain (second row in the second table).&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;You can see the machine SID on your computer by running Sysinternals &lt;a href="http://technet.microsoft.com/en-us/sysinternals/bb897417.aspx" target="_blank"&gt;PsGetSid&lt;/a&gt; with no parameters.&amp;#160; You can see the second SID on a domain-joined system by passing PsGetSid the computer name followed by a $:&amp;#160; &lt;font face="Courier New"&gt;psgetsid %COMPUTERNAME%$&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Mark’s point is that SIDs must be unique &lt;em&gt;within the authority in which they are used&lt;/em&gt;.&amp;#160; So while DEMOSYSTEM must have only one local account with the SID S-1-5-21-3419697060-3810377854-678604692-1000, it doesn’t matter if another computer uses the same SID to refer to a local account of its own.&amp;#160; However, within the BIGDOMAIN domain, there must be only one computer account with the SID S-1-5-21-124525095-708259637-1543119021-937822.&amp;#160; If multiple computers in the domain try to share that computer SID within the domain, problems will occur.&amp;#160; So while it’s OK to clone a system &lt;em&gt;before&lt;/em&gt; it joins a domain, doing so &lt;em&gt;after &lt;/em&gt;it joins a domain (and is assigned a domain computer account and a corresponding domain SID) will cause problems.&lt;/p&gt;  &lt;p&gt;Hope this helps!&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9917978" width="1" height="1"&gt;</description></item><item><title>LUA Buglight 2.1 released</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2009/11/03/lua-buglight-2-1-released.aspx</link><pubDate>Tue, 03 Nov 2009 21:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9916989</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9916989</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2009/11/03/lua-buglight-2-1-released.aspx#comments</comments><description>&lt;P&gt;LUA Buglight 2.1, identifies admin-permissions issues ("LUA bugs") in desktop applications.&amp;nbsp; New version supports Windows 7 (x86 and x64), Vista (x86 and x64), XP (x86 only) and corresponding Server OSes.&lt;/P&gt;
&lt;P&gt;The download and more information is on this page:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/aaron_margosis/pages/LuaBuglight.aspx" mce_href="http://blogs.msdn.com/aaron_margosis/pages/LuaBuglight.aspx"&gt;http://blogs.msdn.com/aaron_margosis/pages/LuaBuglight.aspx&lt;/A&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9916989" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Non_2D00_admin/">Non-admin</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Fixing+LUA+Bugs/">Fixing LUA Bugs</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/LUA+Buglight/">LUA Buglight</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category></item><item><title>Utilities for Local Group Policy and IE Security Zones</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2009/10/02/utilities-for-local-group-policy-and-ie-security-zones.aspx</link><pubDate>Fri, 02 Oct 2009 07:16:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9902200</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9902200</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2009/10/02/utilities-for-local-group-policy-and-ie-security-zones.aspx#comments</comments><description>&lt;p&gt;Because of my work with the Federal Desktop Core Configuration, I’ve published a set of three utilities that manage Local Group Policy.&amp;#160; The newest of these (ImportRegPol) parses registry.pol files and can convert their content to text.&amp;#160; I’ve also created a utility to view and compare IE security zone settings that is particularly helpful on a system that has been locked down with Group Policy.&lt;/p&gt;  &lt;p&gt;I also wrote a &lt;a href="http://blogs.technet.com/fdcc/archive/2009/09/28/the-case-of-the-unexplained-installation-failure-and-an-ill-advised-registry-hack.aspx" target="_blank"&gt;blog post&lt;/a&gt; on the FDCC blog describing compatibility problems caused by a widely-deployed registry hack that tries to prevent Autoplay.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;table border="1" cellspacing="0" cellpadding="0"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;&lt;b&gt;Utility&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;&lt;b&gt;Description and Key Scenarios&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.technet.com/fdcc/pages/LGPO-Utilities.aspx" target="_blank"&gt;Set_FDCC_LGPO&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;Applies full set of NIST FDCC settings into the Local Group Policy of a Windows XP or Windows Vista computer.&lt;/p&gt;          &lt;p&gt;Always applies Administrative Templates; FDCC security templates are optional.&lt;/p&gt;          &lt;p&gt;Current version not supported on versions of Windows other than XP and Vista (Win7 version to be created if/when NIST defines FDCC settings for Windows 7.)&lt;/p&gt;          &lt;p&gt;Intended for automated use; non-interactive.&lt;/p&gt;          &lt;p&gt;Intended as part of image building or image maintenance after deployment.&lt;/p&gt;          &lt;p&gt;Source code provided.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.technet.com/fdcc/pages/LGPO-Utilities.aspx" target="_blank"&gt;Apply_LGPO_Delta&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;Allows application of individual policy settings into the Local Group Policy of a Windows computer. These can include administrative template settings or security template settings.&lt;/p&gt;          &lt;p&gt;All input files are text-based, for ease of editing and customization.&lt;/p&gt;          &lt;p&gt;Intended for automated use; non-interactive.&lt;/p&gt;          &lt;p&gt;Designed to work in scenarios with Set_FDCC_LGPO. Primary purpose is to apply an organization’s variances from FDCC after running Set_FDCC_LGPO.&lt;/p&gt;          &lt;p&gt;Intended for same scenarios as Set_FDCC_LGPO.&lt;/p&gt;          &lt;p&gt;Source code provided.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.technet.com/fdcc/pages/LGPO-Utilities.aspx" target="_blank"&gt;ImportRegPol&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;Reads a registry.pol file and then does one or both of the following:&lt;/p&gt;          &lt;p&gt;1) Applies settings from the registry.pol file to the Computer or User Configuration settings in Local Group Policy on the current computer;&lt;/p&gt;          &lt;p&gt;2) Writes out the settings to a text file in a format that can be consumed by Apply_LGPO_Delta.&lt;/p&gt;          &lt;p&gt;Intended for automated use; non-interactive.&lt;/p&gt;          &lt;p&gt;Intended as part of image building.&lt;/p&gt;          &lt;p&gt;Source code provided.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top"&gt;         &lt;p&gt;&lt;b&gt;&lt;a href="http://blogs.technet.com/fdcc/archive/2009/10/01/viewing-and-comparing-ie-security-zone-settings.aspx" target="_blank"&gt;IE Zone Comparer&lt;/a&gt;&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top"&gt;         &lt;p&gt;GUI program to graphically display and compare two collections of IE security zone settings (policies or preferences for each of the security zones), highlighting settings that differ between the collections.&amp;#160; Useful for seeing what settings are in effect (on a locked down system, the Security tab of the IE Properties dialog is mostly disabled), for comparing differences between zones, and more.&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9902200" width="1" height="1"&gt;</description></item><item><title>Live, on the internet...</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2009/06/15/live-on-the-internet.aspx</link><pubDate>Tue, 16 Jun 2009 05:57:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9757715</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9757715</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2009/06/15/live-on-the-internet.aspx#comments</comments><description>&lt;P&gt;&lt;A href="http://en.wikipedia.org/wiki/Hello#Telephone" target=_blank mce_href="http://en.wikipedia.org/wiki/Hello#Telephone"&gt;Ahoy&lt;/A&gt;, all -- Later this week I'll be appearing at a virtual roundtable hosted by &lt;A href="http://www.microsoft.com/presspass/exec/techfellow/Russinovich/default.mspx" target=_blank mce_href="http://www.microsoft.com/presspass/exec/techfellow/Russinovich/default.mspx"&gt;Mark Russinovich&lt;/A&gt;, streaming live over the web.&amp;nbsp; The topic is Windows 7 application compatibility.&amp;nbsp; Among other things, I'll be demoing the latest&amp;nbsp;(still-unreleased) updates to&amp;nbsp;LUA Buglight (latest released version &lt;A href="http://blogs.msdn.com/aaron_margosis/archive/2008/11/06/lua-buglight-2-0-second-preview.aspx" mce_href="http://blogs.msdn.com/aaron_margosis/archive/2008/11/06/lua-buglight-2-0-second-preview.aspx"&gt;here&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;Here are the details:&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Springboard Series Virtual Roundtable&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;Windows 7 Application Compatibility: Your Questions Answered (Part 1)&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Date:&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Thursday,&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;June 18&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Time:&amp;nbsp;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;11:00am Pacific Time&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;A href="https://ms.istreamplanet.com/springboard"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: blue; mso-bidi-font-family: Calibri"&gt;https://ms.istreamplanet.com/springboard&lt;/SPAN&gt;&lt;/A&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Windows 7, is approaching fast and from the application standpoint is very similar to Windows Vista. We’re going to examine Windows 7 application compatibility not only from the perspective of moving from Windows Vista, but also for those coming from Windows XP. Join us to discuss the most common challenges around application compatibility when coming from a legacy operating system, why changes were made along the way, compatibility technologies inside the OS and methods for getting incompatible applications to run on Windows 7. Along the way we share tips and tricks, demonstrate free tools to analyze and fix applications and answer your specific questions about application compatibility live.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;In Part 2 of this Virtual Round Table discussion (planned for later this Summer/Fall), we’ll discuss the options and approaches for using virtualization tools In depth to address application incompatibilities – including presentation virtualization, desktop virtualization and application virtualization. We’ll be sending out more details and posting information to&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;A href="http://www.microsoft.com/springboard"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: blue; mso-bidi-font-family: Calibri"&gt;www.microsoft.com/springboard&lt;/SPAN&gt;&lt;/A&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;for part 2 as the dates are finalized.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;As part of the “virtual” experience, you may submit your questions about Windows 7&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Application Compatibility to the panel live during the event—or submit questions in advance to&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;A href="mailto:vrtable@microsoft.com"&gt;&lt;SPAN style="FONT-FAMILY: 'Calibri','sans-serif'; COLOR: #0070c0; mso-bidi-font-family: Calibri"&gt;vrtable@microsoft.com&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;FONT face=Calibri&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;.&lt;/SPAN&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none" class=MsoNormal&gt;&lt;B&gt;&lt;SPAN style="FONT-SIZE: 12pt; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri; mso-bidi-font-family: Calibri"&gt;&lt;FONT face=Calibri&gt;Springboard Series: The resource for Windows desktop IT professionals&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="FONT-FAMILY: 'Arial','sans-serif'; FONT-SIZE: 12pt"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9757715" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/LUA+Buglight/">LUA Buglight</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category></item><item><title>FAQ: How do I start a program as the desktop user from an elevated app?</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2009/06/06/faq-how-do-i-start-a-program-as-the-desktop-user-from-an-elevated-app.aspx</link><pubDate>Sat, 06 Jun 2009 07:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9702517</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>12</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9702517</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2009/06/06/faq-how-do-i-start-a-program-as-the-desktop-user-from-an-elevated-app.aspx#comments</comments><description>&lt;P&gt;Common Vista/Win7 scenario:&amp;nbsp; the app you’ve written runs with elevated permissions, but then needs to start another program as the non-elevated desktop user.&amp;nbsp; For example, you want to display web content.&amp;nbsp; Now, you &lt;EM&gt;could&lt;/EM&gt; just launch the web browser from your app, and let the web browser run as admin.&amp;nbsp; What could go wrong?&amp;nbsp; (Hint:&amp;nbsp; the correct answer will include the word “catastrophic”)&lt;/P&gt;
&lt;P&gt;A very common mistake that programmers make is to grab a copy of the elevated, High Integrity Level access token from the current process and then “dumb it down”.&amp;nbsp; I.e., disable powerful group memberships, remove powerful privileges, and change the integrity level to Medium.&amp;nbsp; They then launch the new process with that “dumbed down” token.&amp;nbsp; This breaks for a number of reasons.&lt;/P&gt;
&lt;H2&gt;&lt;STRONG&gt;The new “LUA bug” of Vista/Win7&lt;/STRONG&gt;&lt;/H2&gt;
&lt;P&gt;First and foremost, that approach makes the invalid assumption that the elevated app is running under the same user identity as the desktop user who originally logged on.&amp;nbsp; This is the new “LUA bug” of Vista and Win7.&amp;nbsp; (Refresher:&amp;nbsp; “LUA” = “limited user account”; “LUA bug” = failure that occurs when running as LUA and not administrator.&amp;nbsp; #1 cause of LUA bugs:&amp;nbsp; assumption that the end user will be an administrator.)&amp;nbsp; In Vista/Win7, everything runs as “LUA” by default, unless you specifically allow something to run elevated.&amp;nbsp; If you’re a member of the Administrators group, by default this involves a simple “consent” prompt.&amp;nbsp; The resulting app still runs as you, but with full admin rights.&amp;nbsp; If you’re &lt;EM&gt;not &lt;/EM&gt;a member of Administrators, the elevation prompt requires the credentials of another account that is a member of Administrators.&amp;nbsp; The resulting app then runs &lt;STRONG&gt;&lt;EM&gt;as a different user&lt;/EM&gt;&lt;/STRONG&gt;.&amp;nbsp; A number of apps fail to take this second scenario into consideration.&amp;nbsp; “Dumbing down” the current process token is one example of that kind of failure.&amp;nbsp; The new program runs with reduced permissions, but &lt;STRONG&gt;&lt;EM&gt;not as the intended user&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;There are at least a couple of other failures in that approach too, that are more obscure.&amp;nbsp; Let’s say you are a member of Administrators.&amp;nbsp; When you log on, the Windows LSA (Local Security Authority) generates two access tokens in two separate LSA-managed logon sessions.&amp;nbsp; One is the fully privileged, full-admin token; the other is the standard-user version, which is marked as linked to the full-admin token.&amp;nbsp; When you create a “dumbed-down” copy of the elevated one, the new token is still associated with the elevated session, and marked as being the “high half” of a split token.&amp;nbsp; As a result, if you start Internet Explorer with that token, Protected Mode will be disabled.&amp;nbsp; Also, if your “dumbed-down” process tries to launch an elevated app, it will simply launch the new process with the “dumbed-down” token, since it’s already marked as “elevated.”&lt;/P&gt;
&lt;H2&gt;“Enough nerditude.&amp;nbsp; Tell me what I need to do.”&lt;/H2&gt;
&lt;P&gt;So here’s one sequence that works well:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Enable the SeIncreaseQuotaPrivilege in your current token (&lt;A href="http://msdn.microsoft.com/en-us/library/aa446619.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/aa446619.aspx"&gt;sample&lt;/A&gt;) &lt;/LI&gt;
&lt;LI&gt;Get an HWND representing the desktop shell (&lt;A href="http://msdn.microsoft.com/en-us/ms633512(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/ms633512(VS.85).aspx"&gt;GetShellWindow&lt;/A&gt;) &lt;/LI&gt;
&lt;LI&gt;Get the Process ID (PID) of the process associated with that window (&lt;A href="http://msdn.microsoft.com/en-us/library/ms633522.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms633522.aspx"&gt;GetWindowThreadProcessId&lt;/A&gt;) &lt;/LI&gt;
&lt;LI&gt;Open that process (&lt;A href="http://msdn.microsoft.com/en-us/library/ms684320(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms684320(VS.85).aspx"&gt;OpenProcess&lt;/A&gt;) &lt;/LI&gt;
&lt;LI&gt;Get the access token from that process (&lt;A href="http://msdn.microsoft.com/en-us/library/aa379295.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/aa379295.aspx"&gt;OpenProcessToken&lt;/A&gt;) &lt;/LI&gt;
&lt;LI&gt;Make a primary token with that token (&lt;A href="http://msdn.microsoft.com/en-us/library/aa446617.aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/aa446617.aspx"&gt;DuplicateTokenEx&lt;/A&gt;) &lt;/LI&gt;
&lt;LI&gt;Start the new process with that primary token (&lt;A href="http://msdn.microsoft.com/en-us/library/ms682434(VS.85).aspx" target=_blank mce_href="http://msdn.microsoft.com/en-us/library/ms682434(VS.85).aspx"&gt;CreateProcessWithTokenW&lt;/A&gt;) &lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;I’ve attached an example C++ project, built with VS2008 and the MFC AppWizard, and tested with x86 and x64 builds.&amp;nbsp; The meat of the sample is in &lt;STRONG&gt;RunAsDesktopUser_Implementation.cpp&lt;/STRONG&gt;.&amp;nbsp; I’m sure it can be done in managed code, but that will be someone else’s project, not mine.&lt;/P&gt;
&lt;H2&gt;Caveats&lt;/H2&gt;
&lt;P&gt;Please note that there are a bunch of caveats about this approach:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;This runs the new program in the same context as the desktop shell.&amp;nbsp; If the desktop shell process is not running (crashed or intentionally terminated), GetShellWindow fails, and there is no process token to do anything with.&amp;nbsp; Also, GetShellWindow fails if the default shell (Explorer) has been replaced with a custom shell. &lt;/LI&gt;
&lt;LI&gt;If you have terminated the desktop shell and restarted it elevated (&lt;EM&gt;strongly discouraged&lt;/EM&gt;), then the new process will also run elevated – as will pretty much everything else you start. &lt;/LI&gt;
&lt;LI&gt;This code assumes that it is running already elevated.&amp;nbsp; If you’re not running elevated, then there is no need for this code.&amp;nbsp; If you’re not running as admin, then the necessary step of enabling SeIncreaseQuotaPrivilege won’t work anyway. &lt;/LI&gt;
&lt;LI&gt;CreateProcessWithTokenW requires Vista or newer.&amp;nbsp; So:&amp;nbsp; this approach won’t work on pre-Vista (e.g., XP with runas); &lt;EM&gt;and &lt;/EM&gt;if you want to incorporate this code in a program that can run on XP/2003, you need to use LoadLibrary/GetProcAddress to get the CreateProcessWithTokenW entry point. &lt;/LI&gt;&lt;/UL&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9702517" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-09-70-25-17/RunAsDesktopUser.zip" length="73975" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Vista_2F00_Win7/">Vista/Win7</category></item><item><title>"LUA Bug" demo app</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2008/11/07/lua-bug-demo-app.aspx</link><pubDate>Fri, 07 Nov 2008 16:55:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9052217</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>4</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9052217</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2008/11/07/lua-bug-demo-app.aspx#comments</comments><description>&lt;P&gt;I do a lot of presentations on how to identify and fix "LUA bugs" in applications (*), both for Windows XP and Windows Vista.&amp;nbsp; I frequently use a little VB6 application to demonstrate writing to various portions of the file system and registry, write to .ini files in protected locations, restart services, explicitly check for admin rights, etc.&amp;nbsp; People have asked me to post that app to my blog so that they can use it too.&amp;nbsp; So here it is, including the VB6 project/source code.&lt;/P&gt;
&lt;P&gt;As is, no support, hopefully it's self-explanatory!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Chris Jackson has a more elaborate demo app with full lab script, geared toward application compatibility tools and techniques on Vista.&amp;nbsp; You can get it &lt;A class="" href="http://blogs.msdn.com/cjacks/archive/2008/01/03/stock-viewer-shim-demo-application.aspx" mce_href="http://blogs.msdn.com/cjacks/archive/2008/01/03/stock-viewer-shim-demo-application.aspx"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;(*)&amp;nbsp; "LUA" = "limited user account", a.k.a., "non-admin", "standard user"&lt;BR&gt;"LUA bugs" = application or feature of an application that 1) works when run by a member of Administrators or Power Users; 2) fails when run by a standard user; and 3) has no valid business or technical reason for requiring administrative control over the computer.&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9052217" width="1" height="1"&gt;</description><enclosure url="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-09-05-22-17/LuaBugs_5F00_VB6.zip" length="33072" type="application/x-zip-compressed" /><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Fixing+LUA+Bugs/">Fixing LUA Bugs</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/LUA+Buglight/">LUA Buglight</category></item><item><title>LUA Buglight 2.0, second preview</title><link>http://blogs.msdn.com/b/aaron_margosis/archive/2008/11/06/lua-buglight-2-0-second-preview.aspx</link><pubDate>Thu, 06 Nov 2008 14:05:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9049069</guid><dc:creator>Aaron Margosis</dc:creator><slash:comments>11</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.msdn.com/b/aaron_margosis/rsscomments.aspx?WeblogPostID=9049069</wfw:commentRss><comments>http://blogs.msdn.com/b/aaron_margosis/archive/2008/11/06/lua-buglight-2-0-second-preview.aspx#comments</comments><description>&lt;P&gt;LUA Buglight is a utility that helps identify "LUA bugs" in applications -- application features that that fail as standard user but that work as administrator.&amp;nbsp; I work on it in my spare time, so progress has been slow.&amp;nbsp; Attached to this blog post is the second preview version of LUA Buglight 2.0.&lt;/P&gt;
&lt;P&gt;Main changes since the previous preview:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Single executable:&amp;nbsp; all the helper DLLs, EXEs, etc., are self-extracted to your temp folder when you run the program.&amp;nbsp; No need to copy lots of files around.&lt;/LI&gt;
&lt;LI&gt;For Vista:&amp;nbsp; the helper program that requires elevation is now signed, so you get the nicer elevation prompt.&amp;nbsp; The driver file for Vista is signed as well, so startup is much faster.&lt;/LI&gt;
&lt;LI&gt;Explicit check for x86 -- sorry, the current version cannot be used on 64-bit versions of Windows.&lt;/LI&gt;
&lt;LI&gt;Various bug fixes.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;Some of the improvements of LUA Buglight 2.0 over 1.0:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Much better Vista support&lt;/LI&gt;
&lt;LI&gt;Streamlined UI and improved flow&lt;/LI&gt;
&lt;LI&gt;Identifies more bugs&lt;/LI&gt;
&lt;LI&gt;On XP, not restricted to using a local admin account to create the "this-user-as-admin" context&lt;/LI&gt;
&lt;LI&gt;On Vista, prompts for elevation just one time per session instead of for each test&lt;/LI&gt;
&lt;LI&gt;Log file names autogenerated with timestamp in the name to avoid accidental overwrite of previous logs.&lt;/LI&gt;
&lt;LI&gt;User options saved to the registry.&lt;/LI&gt;&lt;/UL&gt;
&lt;P mce_keep="true"&gt;&lt;STRONG&gt;&lt;FONT color=red size=+2&gt;Updated:&amp;nbsp; Attachment removed, as LUA Buglight 2.1 is now available &lt;A href="http://blogs.msdn.com/aaron_margosis/pages/LuaBuglight.aspx" mce_href="http://blogs.msdn.com/aaron_margosis/pages/LuaBuglight.aspx"&gt;here&lt;/A&gt;.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9049069" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/Fixing+LUA+Bugs/">Fixing LUA Bugs</category><category domain="http://blogs.msdn.com/b/aaron_margosis/archive/tags/LUA+Buglight/">LUA Buglight</category></item></channel></rss>
