/build/static/layout/Breadcrumb_cap_w.png

Appcompat flags are being set for installations EXE

Hey,

We have a custom MSI installer that we use to install an older internally developed application. The application was originally deployed to around 100 workstations with no issues as a build time install.

Now every time we attempt to upgrade the application randomly on around 10%-15% of installations the system is setting the appcompat flag so that the exe must run in admin mode for the user.

I've found some info here - https://msdn.microsoft.com/en-us/library/windows/desktop/hh994464(v=vs.85).aspx

But is there anyway of telling exactly what is causing this? Logfiles? I can't see anything in the msi log that is generated on the machines at install. Also our testing didn't show this behaviour which was done while logged in user running the upgrade via SCCM. Nothing I can see in the syslogs or applogs either.


David

 



2 Comments   [ + ] Show comments
  • so everytime you upgrade the application (and MSI) 10 -15 % of target devices set the app compat flag.
    Can you send details of the compat setting, is it the same on ALL devices - Badger 8 years ago
  • Sorry, it's set as "Windows Vista" compat mode...and "run this program as Administrator" and no it appears completely random as in out of 100 machines only 15 or so had the prolem - Davooo 8 years ago

Answers (2)

Posted by: rileyz 8 years ago
Red Belt
1
Ahhh the curse of the Windows system trying to help you. Normally this happens when the app is trying to do some dodgey stuff, like write to protected areas. Or Windows analyzes the app and thinks you need elevated access, thinking this is your issue.

I'm talking about the application, not the msi installer. I think this is a application compatibility issue.

Have a look at this for a better understanding:

So how do you fix this? Well first thing to try is set the AppCompat flags, the friendly name for this is called Compatibility Mode - where you right click the exe and set it to WinXP compatibility etc. Apply the setting and test it, test it as a standard user, if it works with no UAC prompt then happy days. What you do next is apply AppCompat settings to the package via the registry, have a look at the link below.



The other option is using manifest files, since the app is compiled in house. Need to watch out here, as you need to check if the app has a manifest already, they can embed them in the exe, or have them outside of the exe in the same folder. Check out this link which will guide you in that direction.

I've never used manifest files, always wanted to give them a try but never had the time as it required a bit of learning (and I never had the time).

Just to note, sometimes the manifest file, if there is one, will ask to run with highest privileges. This means if you have access to the administrator security token it will prompt for UAC, if you're a standard user, then it won't prompt for UAC (unless the app explicitly tries to write to a protected area). Programmers set the manifest to ask for highest permissions for no good reason, were run as in invoker will do the job.
Posted by: apptopack 8 years ago
Red Belt
0
It is set in order to make the executable compatible with the current OS.In your case it requires admin rights for proper functionality.When upgraded through SCCM, this was not seen because installations happens in system context when deployed through SCCM.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ