I'm using a Visual Studio setup project together with my own C# bootstrapper project that guides the user through the installation of my software (on Windows 11).
My main problem is that I need admin rights for the very first intallation of the software to set some driver data. Afterwards, elevated rights are no longer needed.
The software is installed system-wide using InstallAllUsers=true to the program data folder. The software can be started by the user(s) without admin rights.
Is there any possibility to perform (automatic) updates for the software without needing elevated rights when it was installed by an admin?
[Edit 1]
I need the admin rights to set data for a driver in the registry in HKLM. Ideally, this would happen every time the program starts, but I want to avoid admin rights for my program. Setting it at the first installation caches nearly 95% of the devices. I have another program to set the data afterwards if necessary.
C:\ProgramDatais by default not writable for regular users.