I am trying to make an application run on any user sign in (or session connection, be it local or remote) having elevated privileges, but without UAC prompt. When new user is added, application should run on his sign ins as well, without additional setup.
I have setup Hyper-V machine with Windows 10 Enterprise v.1709 for testing purposes. On it I have main (referenced as "Admin") account, which is in Administrators group, and one (referenced as "User") account which is only in Users group.
I have created simple WPF application which shows current user and whether it has admin privileges. Final application will be WPF as well.
I will be using WiX to create installer for my application suite (aforementioned application, windows service, maybe something more). The behavior from the title must be set automatically during installation. On installation I can do whatever I want, being limited only by WiX capabilities, but it allows me to run custom application (C#) during setup, so I think there are no restrictions. Installation will be run from account with admin privileges.
Below is what I have tried and what was the outcome:
App in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
"Run this program as an Administrator" not checked
Admin: Starts, no admin privileges
User: Starts, no admin privileges
"Run this program as an Administrator" checked for all users
Admin: Does not start
User: Does not start
Entry in HKLM\Software\Microsoft\Windows\CurrentVersion\Run
"Run this program as an Administrator" not checked
Admin: Starts, no admin privileges
User: Starts, no admin privileges
"Run this program as an Administrator" checked for all users
Admin: Does not start
User: Does not start
Task Scheduler, trigger "At log on of any user"
No other options
Admin: Does not start
User: Does not start
"Run with highest privileges" checked
Admin: Starts, admin privileges
User: Does not start
"Run this program as an Administrator" checked for all users
Admin: Does not start
User: Does not start
"Run this program as an Administrator" checked for all users, "Run with highest privileges" checked
Admin: Starts, admin privileges
User: Does not start
How can it be done? Event Viewer seems to not log any specific information when application does not run at all. Should it be there or such logs might be placed somewhere else? Where then?
Target: Windows 8+, Server 2012+