1

I have a windows app project that so far, the execution level was set to "requireAdministrator", but i want to change this so that a non-admin user can use the application. I set this up in the app.manifesto file (code below)

but when i try the project from a non-admin user, it still asks for admin priveleges.

I tried also with highestAvailable, but still the same story.

Does anyone know what i'm doing wrong?

<requestedExecutionLevel  level="asInvoker" uiAccess="false" />
Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
angularjs
  • 13
  • 4
  • As the answer gets at, there are three possible elevation contexts: launching an installation bootstrap, initiating installation, and launching the installed executable. Manifests only apply to the outer two; the middle is controlled by Windows Installer settings. Please clarify which of these you are trying to address. – Michael Urman Mar 02 '19 at 04:22
  • @MichaelUrman what i want is to launch an installation bootstrap. My application cannot be launched from a user account without elevated privelege. If my client has user account on his laptop, he cannot change anything in the group policy from the Windows Installer settings to install everything with elevated priveleges because this also requires admin rights. I want my app to be installed on any kind of account, including user account, since now i only need to have admin rights. – angularjs Mar 05 '19 at 09:19
  • Either I'm misreading, or your comment disagrees with the original question. If the app requires elevation, there's no point in allowing it to install without elevation (though it can be good to allow the bootstrap to launch non-elevated). If the app *should not* require elevation, then it *may* be good to allow per-user installations (see e.g. https://helpnet.flexerasoftware.com/installshield24helplib/helplibrary/IHelpRunTimePerUserSetups.htm), and ensure all launchable exes are manifested *asInvoker* or *highestAvailable*. For more actionable advice, please clarify your question. – Michael Urman Mar 08 '19 at 19:53

1 Answers1

0

Application Manifest: Where are you adding this? In the app.manifest for the application before it is packaged? That will affect the application.exe file itself - provided you actually recompile the binary and embed the manifest properly. It will not affect the MSI.

Per-User Installation: An MSI can only install without admin rights if you author it to support per-user installation. In other words you need to author the entire MSI to be compatible with per-user installation. This requires a lot of design changes to the MSI in most cases, and I do not like the concept overall. MSI was generally designed for per-machine installation, and the per-user concept and mechanisms have aspects of anti-pattern behavior IMHO. However, here are some links on the subject:


MSIX: In essence, I would not recommend this per-user approach. Could you use other installation technologies? The new kid on the block MSIX has per-user installations as default. I am not an expert, but Bogdan Mitrache of Advanced Installer is and has written a great summary of this new technology: MSIX Tutorial: A comprehensive 24-chapter guide. One of his recent answers on MSIX.

AppV: There is also AppV - virtual packages which many corporations use for application deployment at the moment. Champion (Kahuna) here is Tim Mangan.


Some Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164