<?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>James Finnigan : malware</title><link>http://blogs.msdn.com/jamesfi/archive/tags/malware/default.aspx</link><description>Tags: malware</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Making an MSI that doesn't need a UAC/LUA prompt</title><link>http://blogs.msdn.com/jamesfi/archive/2007/05/02/making-an-msi-that-doesn-t-need-a-uac-lua-prompt.aspx</link><pubDate>Thu, 03 May 2007 08:03:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2387093</guid><dc:creator>jamesfinnigan</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.msdn.com/jamesfi/comments/2387093.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jamesfi/commentrss.aspx?PostID=2387093</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jamesfi/rsscomments.aspx?PostID=2387093</wfw:comment><description>&lt;H2&gt;The goal&lt;/H2&gt;
&lt;P&gt;I think that most things don't need to require a UAC prompt to install - just install it for that user.&amp;nbsp; Why not make the MSI so it doesn't prompt and your users get a smoother experience?&amp;nbsp; (Also, I feel much better installing a program that doesn't require elevation to install - at a minimum I know it's not disabling my anti-malware software.)&amp;nbsp; Ideally, with that same package you could optionally install per-machine (which requires elevation).&amp;nbsp; Here's some information on how to make it happen...&lt;/P&gt;
&lt;H2&gt;Background&lt;/H2&gt;
&lt;P&gt;I was recently asked to make an MSI for an &lt;EM&gt;extremely&lt;/EM&gt; minimal replacement of the &lt;EM&gt;Run As&lt;/EM&gt; menu item that was removed in Vista (by calling runas.exe).&amp;nbsp; Although I doubt we would ever ship something like that I decided to make an installation that didn't elevate, or that could elevate and install per-machine.&amp;nbsp; It was an interesting experience, although I didn't entirely get the behavior I was going for - there are some limitations that make it impossible to do with a&amp;nbsp;MSI in Windows Vista, but still possible in a single download.&amp;nbsp; (More on that later).&lt;/P&gt;
&lt;H2&gt;The technical details&lt;/H2&gt;
&lt;P&gt;All MSIs elevate on Windows Vista by default.&amp;nbsp; However there is a &lt;A href="http://msdn2.microsoft.com/en-us/library/aa372870.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa372870.aspx"&gt;flag that you can set&lt;/A&gt; that will tell MSI that you don't need to elevate.&amp;nbsp; The 3rd bit of the word count summary property can be set by using the msiinfo tool (comes with the platform SDK).&amp;nbsp; Since I also used an embedded cab, that means my word count summary property should be set to 10 (8 | 2 == 10).&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Consolas size=2&gt;msiinfo RunAsNewUser.msi -w 10&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You need to have the feature include both the per-user and per-machine information if you're trying to put both in one package like I did (not a best practice - more on that later).&amp;nbsp; &lt;/P&gt;&lt;PRE class=code&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;    &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Feature&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;RunAsNewUser&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Title&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Run as New User&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Level&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;1&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ComponentRef&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.cmd&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ComponentRef&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.reg.exe&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ComponentRef&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.reg.msc&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ComponentRef&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.cmd&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ComponentRef&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.exe&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;ComponentRef&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.msc&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
    &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Feature&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&lt;FONT face=Consolas&gt;&amp;gt;
&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Your standard MSI that installs to the system directories doesn't face the (fairly simple) issues involved.&amp;nbsp; Here's the per-machine version of my components (you need two versions of the components in order to put them in different directories(*). [I build all my MSIs using &lt;A href="http://wix.sourceforge.net/" mce_href="http://wix.sourceforge.net/"&gt;Wix&lt;/A&gt; - it gives me fine-grained control for making really solid MSIs and it tends to match the way I want to think about MSIs.]&lt;/P&gt;&lt;PRE class=code&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;      &amp;lt;!--&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,128,0)"&gt; We need a per-machine version as well, with seperate components &lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;--&amp;gt;
      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;ProgramFilesFolder&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;AdTools&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.Microsoft&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Microsoft&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
          &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.Runas&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;RunAs&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Guid&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;9D448C8B-AF67-423B-9622-D9720770B61E&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;File&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;DiskId&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;1&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;KeyPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;yes&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;ALLUSERS&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.reg.exe&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Guid&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;98A7DE3E-EF1D-434F-80CB-2F878CD0E9F5&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.reg.exe&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;SystemFileAssociations\.exe\shell\Run as new user...\command&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCR&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;createAndRemoveOnUninstall&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuserCommand.exe&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;expandable&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"[#pm.runasnewuser.cmd]" "%1" %*&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;KeyPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;yes&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;
              &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;ALLUSERS&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.reg.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Guid&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;20D758CC-2774-4532-BD6D-E7C378761C90&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuser.reg.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;SystemFileAssociations\.msc\shell\Run as new user...\command&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCR&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;createAndRemoveOnUninstall&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pm.runasnewuserCommand.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;expandable&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"[#pm.runasnewuser.cmd]" "%1" %*&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;KeyPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;yes&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;
              &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;ALLUSERS&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
          &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
      &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&lt;FONT face=Consolas&gt;&amp;gt;
&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;Notice that I made these components conditional on &lt;FONT face=Consolas&gt;&lt;EM&gt;ALLUSERS&lt;/EM&gt;&lt;/FONT&gt;.&amp;nbsp; We'll make the per-user version conditional on &lt;FONT face=Consolas&gt;&lt;EM&gt;NOT (ALLUSERS)&lt;/EM&gt;&lt;/FONT&gt;.&amp;nbsp; This is pretty basic stuff, and is more or less simply specifying what goes where without much specialized stuff.&amp;nbsp; You can do a per-user setup that looks quite similar by putting it somewhere that isn't off the user's profile.&amp;nbsp; I decided to put mine in the user's profile which means a little extra baggage.&lt;/P&gt;
&lt;P&gt;So we're basically done right?&amp;nbsp; Well, not really, no.&amp;nbsp; We've disabled the elevation, but now you need to make your installation not require elevation.&amp;nbsp; Things like installing to &lt;EM&gt;Program Files&lt;/EM&gt; require admin rights, so we'll need to install to somewhere else.&amp;nbsp; I'm not really sure where that should be - probably %UserProfile%\ProgramFiles or something like that.&amp;nbsp; In this example, I installed to LocalAppData.&lt;/P&gt;&lt;PRE class=code&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;      &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;LocalAppDataFolder&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;AdTools&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
        &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.Microsoft&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Microsoft&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
          &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.Runas&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;RunAs&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Guid&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;06A57A74-7639-4A96-A1FF-6C434ED50CEF&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;File&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Name&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;runasnewuser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;DiskId&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;1&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;runasnewuser.cmd&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.cmd.keypath&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCU&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Software\Microsoft\RunAs\KeyPaths&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;RunAsNewUser.cmd&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;KeyPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;yes&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RemoveFolder&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.Runas&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.Runas&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;On&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;uninstall&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RemoveFolder&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.Microsoft&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Directory&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.Microsoft&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;On&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;uninstall&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;/&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;NOT (ALLUSERS)&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.exe&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Guid&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;C0DB0776-441A-4AB9-871A-5AF1F326FA0A&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.exe&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;SystemFileAssociations\.exe\shell\Run as new user...\command&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCR&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;createAndRemoveOnUninstall&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuserCommand.exe&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;expandable&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"[#pu.runasnewuser.cmd]" "%1" %*&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.keypath&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCU&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Software\Microsoft\RunAs\KeyPaths&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;RunAsNewUser.reg&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;KeyPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;yes&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;NOT (ALLUSERS)&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Guid&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;C5B94A3B-7D87-4FC0-AC28-111B86679251&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;SystemFileAssociations\.msc\shell\Run as new user...\command&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCR&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Action&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;createAndRemoveOnUninstall&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
                &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuserCommand.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;expandable&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;"[#pu.runasnewuser.cmd]" "%1" %*&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryKey&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;RegistryValue&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Id&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;pu.runasnewuser.reg.msc.keypath&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Root&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;HKCU&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Key&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;Software\Microsoft\RunAs\KeyPaths&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;string&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;RunAsNewUser.reg.msc&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; &lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(255,0,0)"&gt;KeyPath&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;=&lt;/SPAN&gt;'&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;yes&lt;/SPAN&gt;'&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt; /&amp;gt;
              &amp;lt;&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;&lt;/SPAN&gt;NOT (ALLUSERS)&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Condition&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
            &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Component&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
          &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
        &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;FONT face=Consolas&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&amp;gt;
      &amp;lt;/&lt;/SPAN&gt;&lt;SPAN style="COLOR: rgb(163,21,21)"&gt;Directory&lt;/SPAN&gt;&lt;/FONT&gt;&lt;SPAN style="COLOR: rgb(0,0,255)"&gt;&lt;FONT face=Consolas&gt;&amp;gt;&lt;/FONT&gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;A href="http://11011.net/software/vspaste" mce_href="http://11011.net/software/vspaste"&gt;&lt;/A&gt;
&lt;P&gt;The extra baggage is the HKCU keypath RegistryValue, and the RemoveFolder entries.&amp;nbsp; Nothing crazy, but a little extra to be aware of.&amp;nbsp; These are necessary because of things like roaming profiles.&lt;/P&gt;
&lt;H2&gt;The experience&lt;/H2&gt;
&lt;P&gt;&amp;nbsp;You can install it and it goes through without any elevation.&amp;nbsp; The installation is per-user by default.&amp;nbsp; (Yay! Per-user works and has a smokin' experience, and supports all kinds of scenarios.)&lt;/P&gt;
&lt;P&gt;If you want to install it per-machine, you need to launch it via this command: &lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT face=Consolas&gt;msiexec /i RunAsNewUser.msi ALLUSERS=1&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This is obviously not ideal - but there's a hidden hiccup.&amp;nbsp; I thought that it would prompt for elevation if you specified ALLUSERS=1 - it does not.&amp;nbsp; You get this error message:&lt;/P&gt;
&lt;P&gt;&lt;IMG style="MARGIN: 5px" height=197 alt="You do not have sufficient privileges to complete this installation for all usrs of the machine." src="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/MakinganMSIthatdoesntneedaUACLUAprompt_1361C/image_2.png" width=398 mce_src="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/MakinganMSIthatdoesntneedaUACLUAprompt_1361C/image_2.png"&gt; &lt;/P&gt;
&lt;P&gt;It's not the end of the world.&amp;nbsp; If you run the same command from an already elevated process (e.g. an elevated command prompt) the installation goes through just fine (as the error message implies).&amp;nbsp; It's a bit of a shame, but I've confirmed with Carolyn that you can't build a single package that will elevate sometimes and sometimes not (because the flag is in the MSI summary information it can't be changed in-flight).&lt;/P&gt;
&lt;H2&gt;The best practice for building a per-user (without elevation) &lt;EM&gt;and &lt;/EM&gt;per-machine app (with elevation)&lt;/H2&gt;
&lt;P&gt;Because of the limitations noted above, here's what is the best practice for building a per-user &lt;EM&gt;and &lt;/EM&gt;per-machine app:&amp;nbsp; Have a bootstrapper exe, and two separate&amp;nbsp;MSIs (one per-user package and one per-machine package).&amp;nbsp; If these are embedded in the bootstrapper exe as resources that are extracted at install, then you can a single download that installs either as per-machine or per-user.&lt;/P&gt;
&lt;P&gt;Why?&amp;nbsp; Well, not many folks are trying to do this at the moment.&amp;nbsp; Of course, more will as Vista is on more and more computers - ultimately I think this is a huge step forward for keeping your computer free of malware.&amp;nbsp; I think it's worth saying twice: I feel much better installing a program that doesn't require elevation to install - at a minimum I know it's not disabling my anti-malware software.&lt;/P&gt;
&lt;H2&gt;Other Resources&lt;/H2&gt;
&lt;P&gt;&lt;A title=http://blogs.msdn.com/windows_installer_team/ href="http://blogs.msdn.com/windows_installer_team/" mce_href="http://blogs.msdn.com/windows_installer_team/"&gt;http://blogs.msdn.com/windows_installer_team/&lt;/A&gt;&amp;nbsp;- Get it straight from the horse's mouth&lt;/P&gt;
&lt;P&gt;&lt;A title=http://blogs.msdn.com/astebner/archive/2006/12/13/some-useful-things-i-have-learned-about-windows-installer-and-uac.aspx href="http://blogs.msdn.com/astebner/archive/2006/12/13/some-useful-things-i-have-learned-about-windows-installer-and-uac.aspx" mce_href="http://blogs.msdn.com/astebner/archive/2006/12/13/some-useful-things-i-have-learned-about-windows-installer-and-uac.aspx"&gt;http://blogs.msdn.com/astebner/archive/2006/12/13/some-useful-things-i-have-learned-about-windows-installer-and-uac.aspx&lt;/A&gt;&amp;nbsp;- Good intro article that doesn't bury you in information like Roberts' (great) blog entries&lt;/P&gt;
&lt;P&gt;&lt;A title=http://blogs.msdn.com/rflaming/archive/2006/10/01/uac-in-msi-notes-answers-to-questions-in-comments-from-earlier-blog-posts.aspx href="http://blogs.msdn.com/rflaming/archive/2006/10/01/uac-in-msi-notes-answers-to-questions-in-comments-from-earlier-blog-posts.aspx" mce_href="http://blogs.msdn.com/rflaming/archive/2006/10/01/uac-in-msi-notes-answers-to-questions-in-comments-from-earlier-blog-posts.aspx"&gt;http://blogs.msdn.com/rflaming/archive/2006/10/01/uac-in-msi-notes-answers-to-questions-in-comments-from-earlier-blog-posts.aspx&lt;/A&gt;&amp;nbsp;- Summary of Robert's huge series about MSI and UAC&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/rflaming/archive/2006/09/30/778690.aspx"&gt;http://blogs.msdn.com/rflaming/archive/2006/09/30/778690.aspx&lt;/A&gt;&amp;nbsp;- Robert gives his take on the question: Should I write my installer as a Standard User install? If yes, how?&lt;/P&gt;
&lt;HR&gt;

&lt;P&gt;*&amp;nbsp;I imagine that you don't really need two versions of the components because I imagine that you could change the directory location using a custom action that set it, but I just found things a lot simpler if I used two different components&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=2387093" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jamesfi/archive/tags/malware/default.aspx">malware</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/LUA/default.aspx">LUA</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/UAC/default.aspx">UAC</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Setup/default.aspx">Setup</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Wix/default.aspx">Wix</category></item><item><title>Google emails a worm</title><link>http://blogs.msdn.com/jamesfi/archive/2006/11/09/google-emails-a-worm.aspx</link><pubDate>Thu, 09 Nov 2006 21:51:48 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1044797</guid><dc:creator>jamesfinnigan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/jamesfi/comments/1044797.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jamesfi/commentrss.aspx?PostID=1044797</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jamesfi/rsscomments.aspx?PostID=1044797</wfw:comment><description>&lt;p&gt;Hey, &lt;a href="http://jamesfinnigan.spaces.live.com/blog/cns!9062539B2F0077D6!577.entry"&gt;Apple gets to ship worms&lt;/a&gt;, it's only fitting that &lt;a href="http://news.com.com/Google+accidentally+sends+out+e-mail+worm/2100-7349_3-6133829.html"&gt;Google emails them&lt;/a&gt;.&amp;nbsp; I only wish Microsoft hadn't done &lt;a href="http://dgl.com/dglinfo/1996/dg961023.html"&gt;a similar thing&lt;/a&gt; a long time ago (but at least it was a long time ago).&amp;nbsp; How often does this happen?!?&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1044797" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Google/default.aspx">Google</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/News/default.aspx">News</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/malware/default.aspx">malware</category></item></channel></rss>