title: WiX - Switch InstallScope from perUser to perMachine
body: <p>I'm trying to create an installer that supports perUser and perMachine installations dependent on a selection of setup types on the UI.</p>
  
  <ul>
  <li>The perUser setup type installs the application into "WIX_DIR_COMMON_DOCUMENTS" and shall require no admin permissions.</li>
  <li>The perMachine setup type install the application into "ProgramFilesFolder" and shall request an UAC dialog.</li>
  </ul>
  
  <p>My attempt was to initially set the Package/@InstallScope to perUser and then modify the ALLUSERS property later on.</p>
  
  <p>If the user selects the perMachine setup type I'm trying to set the ALLUSERS property to 1 doing the following:</p>
  
  <pre><code>&lt;Publish Property="ALLUSERS" Value="1"&gt;1&lt;/Publish&gt;
  </code></pre>
  
  <p>The "Install" buttons gets an UAC icon, but no UAC dialog appears after I pressed it! </p>
  
  <p><img src="https://i.stack.imgur.com/G8xW5.png" alt="enter image description here"></p>
  
  <p>Instead I get an error message that I obviously have no privileges to install the application for all users of the machine.</p>
  
  <p>Is it a bug that no UAC dialog appears or intended? Am I missing something?</p>