<?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 : Setup</title><link>http://blogs.msdn.com/jamesfi/archive/tags/Setup/default.aspx</link><description>Tags: Setup</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>The Shell Extensions Approved list is *not* a complete list of shell extensions on the system</title><link>http://blogs.msdn.com/jamesfi/archive/2007/09/07/the-shell-extensions-approved-list-is-not-a-complete-list-of-shell-extensions-on-the-system.aspx</link><pubDate>Sat, 08 Sep 2007 07:42:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4822611</guid><dc:creator>jamesfinnigan</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/jamesfi/comments/4822611.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jamesfi/commentrss.aspx?PostID=4822611</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jamesfi/rsscomments.aspx?PostID=4822611</wfw:comment><description>&lt;p&gt;I've noticed that a number of different programs just look at the Approved list of shell extensions [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved] and figure that all shell extensions will be in that list.&amp;nbsp; It's not true, because lots of folks don't really care about &lt;a href="http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/gp/237.mspx?mfr=true" target="_blank"&gt;that policy&lt;/a&gt;.&amp;nbsp; I don't know how often it's used - it doesn't really make your system more secure as far as I can tell.&amp;nbsp; (It may reduce the TCO related to folks installing poorly written shell extensions.)&lt;/p&gt; &lt;p&gt;It also doesn't apply to all shell extensions.&amp;nbsp; There are many of them (probably some of them with HKCU extensibility) that haven't been moved to the policy system yet.&amp;nbsp; (So you should always register your shell extensions there, even if it doesn't seem to be necessary.)&lt;/p&gt; &lt;p&gt;(That said, it certainly does give you quite a few of them for very little work. On my system, it finds about 325/400 - about 80%.&amp;nbsp; Because of that,&amp;nbsp;if you're thinking about turning on this policy consider the fact that you'll be disabling 1 in 5 shell extensions; will&amp;nbsp;that generate more or less support calls?)&lt;/p&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4822611" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jamesfi/archive/tags/shell/default.aspx">shell</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Setup/default.aspx">Setup</category></item><item><title>Supplemental Registrations (aka. Context Menu Handers (etc) - where are they loaded from...)</title><link>http://blogs.msdn.com/jamesfi/archive/2007/09/06/supplemental-registrations-aka-context-menu-handers-etc-where-are-they-loaded-from.aspx</link><pubDate>Thu, 06 Sep 2007 19:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4779995</guid><dc:creator>jamesfinnigan</dc:creator><slash:comments>7</slash:comments><comments>http://blogs.msdn.com/jamesfi/comments/4779995.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jamesfi/commentrss.aspx?PostID=4779995</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jamesfi/rsscomments.aspx?PostID=4779995</wfw:comment><description>&lt;P&gt;I've been thinking about the registration problem where you want to add a context menu (much of this applies to static verbs as well) to a file type (we'll say .ogg).&amp;nbsp; You don't want the default verb, you just want to add some verbs.&amp;nbsp; Because you don't want the default, you shouldn't put your progid in the HKCR\.ogg default value, so you put an entry under HKCR\.ogg\shellex\ContextMenuHandler.&amp;nbsp; And this works great.. until someone comes along and puts a progid in HKCR\.ogg's default value.&amp;nbsp; Look at the fallthrough logic below - #2 (where we registered), and #3 are only used if there is no progid!&amp;nbsp; 
&lt;P&gt;Fallthrough logic when loading context menu handlers (static verbs and then context menu handlers are collected from the following places): 
&lt;P&gt;&lt;STRONG&gt;(DO NOT USE THIS LOGIC&amp;nbsp;IN YOUR CODE&amp;nbsp;- it is a simplification of the real logic &lt;EM&gt;and &lt;/EM&gt;it will change.&amp;nbsp; Instead, use &lt;/STRONG&gt;&lt;A href="http://msdn2.microsoft.com/en-us/library/ms633715.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/ms633715.aspx"&gt;&lt;STRONG&gt;IQueryAssociations&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt; or AssocQuery* for all these kinds of file association related things.)&lt;/STRONG&gt; 
&lt;OL&gt;
&lt;LI&gt;HKCR\&amp;lt;ProgID&amp;gt; 
&lt;LI&gt;HKCR\&amp;lt;.ext&amp;gt; (only if #1 does not exist) 
&lt;LI&gt;HKCR\Unknown (only if #1 does not exist) 
&lt;LI&gt;HKCR\SystemFileAssociations\&amp;lt;.ext&amp;gt; 
&lt;LI&gt;HKCR\SystemFileAssociations\&amp;lt;PerceivedType&amp;gt; 
&lt;LI&gt;HKCR\Folder (only used if the selected item has the SFGAO_FOLDER attribute, such as a folder, zip, cab, etc.) 
&lt;LI&gt;HKCR\* 
&lt;LI&gt;HKCR\AllFilesystemObjects&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;But there is a way!&amp;nbsp; You can register &lt;A href="http://msdn2.microsoft.com/en-us/library/aa969385.aspx#supplemental" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/aa969385.aspx#supplemental"&gt;supplemental verbs&lt;/A&gt; associated with the &lt;A href="http://msdn2.microsoft.com/en-us/library/aa969373.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/aa969373.aspx"&gt;SystemFileAssociations&lt;/A&gt; key.&amp;nbsp; Note that those keys (#4 and #5) are folded in regardless of the association having a progid registered.&amp;nbsp; In our example, that would be HKCR\SystemFileAssociations\.ogg\shellex\ContextMenuHandler&lt;/P&gt;
&lt;P&gt;The important thing here is that you should never put the registration under HKCR\&amp;lt;.ext&amp;gt;(!) because you should either be putting it under your progid (#1), or in SystemFileAssociations (#4).&amp;nbsp; Why do we disable #2 and #3 in those cases?&amp;nbsp; If folks are interested, I'll talk more about that later - or feel free to guess. :)&lt;/P&gt;
&lt;P&gt;(A quick comment about #5 - I think it is often misused.&amp;nbsp; Applications don't know how to handle very many perceived types (one exception is text).&amp;nbsp; How are you going to handle the "video" perceived type?&amp;nbsp; I guarantee that we'll come out with more codecs/container formats, etc.&amp;nbsp; Unless you can guarantee that you can handle everything that will map into the perceived type, don't register for it - instead register for the individual associations that you really &lt;EM&gt;can&lt;/EM&gt; handle.)&lt;/P&gt;
&lt;P&gt;This technique is used for a lot of other things besides context menu handlers.&amp;nbsp; It's also used for &lt;A href="http://msdn2.microsoft.com/en-us/library/bb266532.aspx" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library/bb266532.aspx"&gt;Property Handlers for Windows Search&lt;/A&gt;, &lt;A href="http://msdn2.microsoft.com/en-us/library//aa905327.aspx#installinganduninstalling" target=_blank mce_href="http://msdn2.microsoft.com/en-us/library//aa905327.aspx#installinganduninstalling"&gt;Windows Imaging Component codecs&lt;/A&gt;, etc, etc, etc.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR&gt;James&lt;/P&gt;
&lt;P&gt;[Update: finished the sentence beginning "In our example, that would be..."]&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4779995" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jamesfi/archive/tags/shell/default.aspx">shell</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Setup/default.aspx">Setup</category></item><item><title>Installing shell extensions - please complain here</title><link>http://blogs.msdn.com/jamesfi/archive/2007/08/10/installing-shell-extensions-please-complain-here.aspx</link><pubDate>Sat, 11 Aug 2007 04:02:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:4328374</guid><dc:creator>jamesfinnigan</dc:creator><slash:comments>9</slash:comments><comments>http://blogs.msdn.com/jamesfi/comments/4328374.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jamesfi/commentrss.aspx?PostID=4328374</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jamesfi/rsscomments.aspx?PostID=4328374</wfw:comment><description>&lt;P&gt;So... I've been looking more closely at Wix and I think I'm going to build some custom actions to do a really good job installing shell extensions.&amp;nbsp; Which ones do you find most problematic?&amp;nbsp; I realize this is a bit of a change of pace for the blog, so I'll probably hit a few other forums, but please feel free to add comments/complaints about which extensions are problematic.&lt;/P&gt;
&lt;P&gt;Maybe you've already done the work to install these properly, but in some cases that can be quite complicated and I could see a lot of folks just accepting some minor bugs and moving on.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;I'll start: &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Protocol Handlers (&lt;A href="http://msdn2.microsoft.com/en-us/library/bb266527.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/bb266527.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb266527.aspx&lt;/A&gt;)&amp;nbsp;and Schema Extensions (&lt;A href="http://msdn2.microsoft.com/en-us/library/ms647576.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/ms647576.aspx"&gt;http://msdn2.microsoft.com/en-us/library/ms647576.aspx&lt;/A&gt;).&amp;nbsp; Both of these &lt;EM&gt;require&lt;/EM&gt; custom actions to be installed correctly - and there's no standard for it so everyone is probably doing it themselves which is going to lead to some really inconsistent behavior.&amp;nbsp; None of that is going to help system stability at all.&lt;/P&gt;
&lt;P&gt;Another one I came across recently was installing a shell folder that should appear on the desktop.&amp;nbsp; I added it to the desktop namespace but until the user refreshes the desktop it isn't going to appear.&amp;nbsp; You need to send a SHChangeNotify to get it to show up without user intervention.&amp;nbsp; Anyway, there's no standard action for that.&amp;nbsp; So unless you can accept a shortcut to the shell folder (which sends a notification), you'll want a CA there as well.&amp;nbsp; And there again, you want to send as minimal a notification as possible to avoid having the system reload everything when all that you needed is a new icon to show up.&lt;/P&gt;
&lt;P&gt;File Associations:&lt;BR&gt;This one is going to be a bit of a laundry list of issues, but I'll start off the first couple issues.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If previous handlers didn't register under openwith then your registration may blow away any record that they wanted to handle that file association.&lt;/LI&gt;
&lt;LI&gt;If you register under a meta-type like TXTFile and then someone else claims .txt then you don't get invoked at all.&lt;/LI&gt;
&lt;LI&gt;Man that thing is complicated.&amp;nbsp; Way, way complicated. (I'm still learning the subtleties - feel free to correct me if I miss a beat.)&lt;/LI&gt;&lt;/OL&gt;
&lt;P&gt;So there's a start - let me know&amp;nbsp;as you come across other issues.&lt;/P&gt;
&lt;P&gt;Cheers,&lt;BR&gt;James&lt;/P&gt;
&lt;P mce_keep="true"&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=4328374" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jamesfi/archive/tags/shell/default.aspx">shell</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><category domain="http://blogs.msdn.com/jamesfi/archive/tags/install/default.aspx">install</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/MSI/default.aspx">MSI</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/explorer/default.aspx">explorer</category></item><item><title>The best way to make UAC shut up for a while</title><link>http://blogs.msdn.com/jamesfi/archive/2007/06/08/the-best-way-to-make-uac-shut-up-for-a-while.aspx</link><pubDate>Sat, 09 Jun 2007 06:25:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:3174222</guid><dc:creator>jamesfinnigan</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/jamesfi/comments/3174222.aspx</comments><wfw:commentRss>http://blogs.msdn.com/jamesfi/commentrss.aspx?PostID=3174222</wfw:commentRss><wfw:comment>http://blogs.msdn.com/jamesfi/rsscomments.aspx?PostID=3174222</wfw:comment><description>&lt;P&gt;Let's say you want to install a few things and want UAC to stop bugging you while you install them.&amp;nbsp; Should you turn off UAC and install the apps?&amp;nbsp; Since that disables UAC's virtualization, it can destabilize things that depend on data written to those virtual locations.&amp;nbsp; Here's an alternative that keeps all the virtualization intact while getting UAC to lay off for a while.&lt;/P&gt;
&lt;P&gt;Fire up gpedit.msc and adjust this policy (pictured below):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image.png" atomicselection="true" mce_href="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=575 alt=image src="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image_thumb.png" width=1103 border=0 mce_src="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image_thumb.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Change it to be &lt;EM&gt;Elevate without prompting&lt;/EM&gt;:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image_1.png" atomicselection="true" mce_href="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image_1.png"&gt;&lt;IMG style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px" height=511 alt=image src="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image_thumb_1.png" width=431 border=0 mce_src="http://blogs.msdn.com/blogfiles/jamesfi/WindowsLiveWriter/ThebestwaytomakeUACshutupforawhile_11F33/image_thumb_1.png"&gt;&lt;/A&gt; &lt;/P&gt;
&lt;P&gt;Of course, remember to turn it back when you're done! :)&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;James&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;[Update: how to do this without using gpedit.msc]&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Run this command&amp;nbsp;(from an elevated&amp;nbsp;command prompt) to make UAC elevate without prompting:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;When you're done, run this command (from an elevated command prompt) to set it back to the default:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d&amp;nbsp;2 /f&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=3174222" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/jamesfi/archive/tags/Tips/default.aspx">Tips</category><category domain="http://blogs.msdn.com/jamesfi/archive/tags/virtualization/default.aspx">virtualization</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></item><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></channel></rss>