Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows UAC Dialog

I have an application that has no resources (at all, so no UAC manifest either). This application installs itself to the appdata/roaming folder with CopyFile. It also sets an autostart so it starts automatically with every start. Now with every start of the pc, the UAC Dialog pops up and says that the application does changes to the pc. It also has the shield sign on the icon if it's located in appdata. How can I remove the dialog / the shield in the icon? Does Windows detect the copyfile API and sets it automatically?

Thanks for your answer(s).

like image 452
Ben Avatar asked Oct 21 '12 04:10

Ben


People also ask

What is UAC dialog?

With UAC enabled, Windows 10 or Windows 11 prompts for consent or prompts for credentials of a valid local administrator account before starting a program or task that requires a full administrator access token. This prompt ensures that no malicious software can be silently installed. The consent prompt.

What triggers a UAC prompt?

There are many types of activities that may trigger a UAC prompt: Running a desktop application as an administrator. Making changes to settings and files in the Windows and Program Files folders. Installing or removing drivers and desktop applications.


1 Answers

The best way to avoid it is to add the application manifest: it explicitly conveys to the system that this is not a legacy application and no install-detection logic (which could have false positives) should be applied.

Additionally, your application should have a VersionInfo resource which contains the version of the file and the description.

If your application does not have the manifest, the system uses heuristics to detect if it's installer. If it thinks the application is installer, then running your application will require elevation, and the app will have shield on its icon and executable file.

Excerpt from Installer detection technology:

  • The file name includes keywords such as "install," "setup," or "update."
  • Versioning Resource fields contain the following keywords: Vendor, Company Name, Product Name, File Description, Original Filename, Internal Name, and Export Name.
like image 115
Alexey Ivanov Avatar answered Oct 02 '22 22:10

Alexey Ivanov