title: Make Inno Setup installer request privileges elevation only when needed
body: <p><a href="https://jrsoftware.org/isinfo.php" rel="noreferrer">Inno Setup</a> installer has the <a href="https://jrsoftware.org/ishelp/index.php?topic=setup_privilegesrequired" rel="noreferrer"><code>PrivilegesRequired</code> directive</a> that can be used to control, if privileges elevation is required, when installer is starting. I want my installer to work even for non-admin users (no problem about installing my app to user folder, instead of the <code>Program Files</code>). So I set the <code>PrivilegesRequired</code> to <code>none</code> (undocumented value). This makes UAC prompt popup for admin users only, so they can install even to the <code>Program Files</code>. No UAC prompt for non-admin users, so even them can install the application (to user folder).</p>
  
  <p>This has some drawbacks though:</p>
  
  <ul>
  <li>Some people use distinct admin and non-admin accounts on their machines, working with non-admin account normally. In general, when launching installation using non-admin account, when they get UAC prompt, they enter credentials for the admin account to proceed. But this won't work with my installer, because there's no UAC prompt.</li>
  <li>(Overly suspicious) people with admin account, who want to install to user folder, cannot launch my installer without (not-needed) admin privileges.</li>
  </ul>
  
  <p>Is there some way to make Inno Setup request privileges elevation only when needed (when user selects installation folder writable by admin account only)?</p>
  
  <p>I assume there's no setting for this in Inno Setup. But possibly, there's a programmatic solution (Inno Setup Pascal scripting) or some kind of plugin/DLL.</p>
  
  <hr>
  
  <p>Note that Inno Setup 6 has a built-in support for <a href="https://jrsoftware.org/ishelp/index.php?topic=admininstallmode" rel="noreferrer">non-administrative install mode</a>.</p>