title: Setting ALLUSERS in WiX for per-user or per-machine installation context
body: <p>I use WiX 3.5. My installer should enable both per-user and per-machine installation. I would like to achieve that by using radio buttons ("Everyone" and "Just me").</p>
  
  <p>I found a couple of references on the Internet:</p>
  
  <ul>
  <li>Selecting current-user or all-users install: <em><a href="http://www.merlinia.com/mdt/WiXTutorial2.msl" rel="nofollow">Adding a user interface</a></em>, part of <em>Yet Another WiX Tutorial - Part 2 - Adding the UI</em>.</li>
  <li>Set the ALLUSERS property to an empty string: <em><a href="http://blogs.msdn.com/b/astebner/archive/2007/11/18/6385121.aspx" rel="nofollow">Using WiX 3.0 to create a per-user MSI that does not prompt for elevation on Windows Vista</a></em></li>
  </ul>
  
  <p>If I understand that correctly my installer should set ALLUSERS property to 1 for per-machine installation and to "" (empty string) for per-user installation.</p>
  
  <p>My problem is no matter what I try ALLUSERS is always set to 1. Even when I don't set it at all!</p>
  
  <p>Here is a couple of things I tried:</p>
  
  <pre><code>&lt;Control Id="UserSelection"
           Type="RadioButtonGroup"
           X="26"
           Y="115"
           Width="305"
           Height="45"
           Property="ASSISTANCE_USERS"
           Text="ASSISTANCE_USERS"&gt;
      &lt;RadioButtonGroup Property="ASSISTANCE_USERS"&gt;
          &lt;RadioButton Value="cur"
                       X="0"
                       Y="0"
                       Width="295"
                       Height="16"
                       Text="Just me" /&gt;
          &lt;RadioButton Value="all"
                       X="0"
                       Y="20"
                       Width="295"
                       Height="16"
                       Text="Everyone" /&gt;
      &lt;/RadioButtonGroup&gt;
  &lt;/Control&gt;
  </code></pre>
  
  <p>and then setting the ALLUSERS based on ASSISTANCE_USERS:</p>
  
  <pre><code>  &lt;Publish Property="ALLUSERS"
             Value="{}"&gt;ASSISTANCE_USERS = "cur"&lt;/Publish&gt; &lt;!-- set null value --&gt;
    &lt;Publish Property="ALLUSERS"
             Value="1"&gt;ASSISTANCE_USERS = "all"&lt;/Publish&gt;
  </code></pre>
  
  <p>However, ALLUSERS is always 1.</p>
  
  <p>I also tried just setting ALLUSERS to an empty string:</p>
  
  <pre><code>&lt;Property Id="ALLUSERS" Secure="yes"/&gt;
  </code></pre>
  
  <p>This should set ALLUSERS to "", yet it stays "1"</p>
  
  <p>Once I'm able to set ALLUSERS, I should be able to use HKMU for per-user and per-machine installtion.</p>