I know the answer here is probably "you can't do that" but in the hopes that I'm missing something I thought I'd ask. I have a C# 4.0 app that needs to read registry keys from HKLM. Upon deployment to Windows Server 2019, we want to be able to have regular (i.e. non-admin) users run the app with LUA enabled and without users having access to admin credentials. Is there any way to facilitate this - either through code, manifest, one-time setup operation (i.e. an admin performs some operation once and after that regular users can run the app without issue), registry setting, etc.?
I'm currently looking into moving those keys to HKCU or other ways to store the data I need but that's not definitively an option (for messy legacy/management reasons I won't get into here). So if anyone here has any ideas, they'd be greatly appreciated.
Also, if anyone knows of a definitive resource for finding out exactly what is causing a .NET app to require admin privileges that would be appreciated as well. I would have thought that kind of thing would be relatively easy to find but I'm surprisingly having some trouble with that.
Thanks in advance!
EDIT: FYI, we also have a native C++ app on the same system that accesses the same registry keys in HKLM and that appears to run OK (without even a UAC prompt).
Ack! Thanks Damien_The_Unbeliever (see comment above). We do set those permissions but your comment spurred me to double-check those and I found one key that did not have the permissions set properly. This key was being referenced by my app on startup but not the native C++ app, hence the discrepancy. Sometimes it takes an outside perspective to remind you to be more thorough...