- Nov 30, 2020
- Programming Experience
Hello.You can read from Program Files without admin rights.
You can change Time Zones without being an admin. Do you really need to change the time when modern Windows actually synchronizes itself with NTP servers which use atomic clocks to keep time?
The correct thing to do is to get the UAC only at the time when you are trying to do something that actually requires admin rights, at the time when you need it. You don't want to always be running as admin. By always running as admin, you open up the attack surface for viruses. A virus will just have to inject itself into app instead of trying to inject itself into other more will known apps/processes which are more actively monitored by AV software and/or Windows Defender.
Please follow the Windows Guidelines with regards to UAC:
A well designed User Account Control experience helps prevent unwanted system-wide changes in a way that is predictable and requires minimal effort.docs.microsoft.com
Thanks for your kind help.
I made my c# app to run as an administrator using process reference instead of requireAdministrator excutionLevel . So my app run in startup and I can write file and change system time.
By the way my app has some problem still now. It seems to be UAC problem.
Whenever my app start on windows 10 64bit, "unknown publisher ..." message popup now.
I attached the message screen now. If I set UAC level to lowest(never notify) in UAC setting, I never get this message but I want to keep the level and prevent this message.
Can you help me in this section?