How to avoid the "Windows Defender SmartScreen prevented an unrecognized app from starting warning"

WindowsInstallationWindows Installer

Windows Problem Overview


My company distributes an installer to customers via our website. Recently when I download via the website and try to run the installer I get the warning message:

> Windows protected your PC > > Windows Defender SmartScreen prevented an > unrecognized app from starting. Running this app might put your PC at > risk.

If I right-click on the installer and choose Properties I note the following:

Enter image description here

Our installer is signed.

How do I find the reason for the Windows Defender SmartScreen warning?

I have not managed to find any log file for Windows Defender nor found anything in the Event Viewer.

Windows Solutions


Solution 1 - Windows

After clicking on Properties of any installer(.exe) which block your application to install (Windows Defender SmartScreen prevented an unrecognized app ) for that issue i found one solution

> 1. Right click on installer(.exe) > 2. Select properties option. > 3. Click on checkbox to check Unblock at the bottom of Properties.

This solution work for Heroku CLI (heroku-x64) installer(.exe)

Solution 2 - Windows

TL;DR

This warning is shown if your app doesn't have enough reputation with Microsoft SmartScreen yet. In order to gain reputation, you can either

  • submit your app for malware analysis to Microsoft,
  • buy an "Extended Validation" code signing certificate,
  • buy a standard code signing certificate, or
  • just wait for a long time.

Read on for the details about these different options.

Option 1: Submit your app for malware analysis to Microsoft

Microsoft allows software developers to submit a file for malware analysis. According to Microsoft, this will help developers to "validate detection of their products". If the review was successful, the Microsoft SmartScreen warnings will go away faster, or sometimes even instantly (it worked instantly for one of my own apps). You need to have a Microsoft account to submit your app for review.

However, note that if you release an updated version of your app, then you'll also have to request a new review again. To overcome this problem, you'll either have to use an "Extended Validation" or a standard code signing certificate (see below).

Option 2: Buy an "Extended Validation" code signing certificate

A guaranteed way to immediately and permanently get rid of the Microsoft SmartScreen warnings is to buy an "Extended Validation" (EV) code signing certificate from one of the Microsoft-approved certificate authorities (CA's), and to sign your app with that EV certificate.

Such an EV certificate will cost you somewhere between 250 and 700 USD per year, and will only be issued to registered businesses. If you're a single developer, you must be a sole proprietor and have an active business license. You can read more about the formal requirements for EV code signing certificates in the EV Code Signing Certificate Guidelines.

An EV certificate will typically be shipped to you by physical delivery on a hardware token.

Option 3: Buy a standard code signing certificate

The cheaper "standard" (i.e. non-EV) code signing certificates can also be used to permanently, but not instantly, get rid of the Microsoft SmartScreen warnings. Standard code signing certificates will cost you between 100 and 500 USD per year, and can also be issued to private developers without an active business license. Some CA's also offer discounts for open source projects.

No instant solution

The problem with standard code signing certificates is that they do not instantly silence Microsoft SmartScreen. Instead, some time will be needed for your certificate to build reputation before the warning will go away. However, once your certificate has built enough reputation, all applications signed with that certificate will be permanently trusted by Microsoft SmartScreen and won't trigger the warning anymore.

How long will it take?

So, how long will it take until the Microsoft SmartScreen warning will disappear when using a standard code signing certificate? Unfortunately, this is difficult to answer, since Microsoft itself refuses to publish any details about this. And since there is a whole bunch of information that Microsoft SmartScreen might use to decide upon trustworthiness, your mileage may vary greatly. According to inofficial numbers reported by various sources (see below), it usually takes between 2 and 8 weeks until the warning will permanently go away. However, keep in mind that this will also depend on how many downloads and / or installs your app has.

The inofficial numbers are:

  • 42 days and about 1.400 app installs. Source: my own certificate (Feb 2021)
  • 16 days and about 2.000 app installs. Source: my own certificate (May 2020)
  • One month and more than 10.000 downloads. Source: here (Jan 2020)
  • Between a few weeks and a month. Source: here (Dec 2019)
  • About 2-3 weeks. Source: here (Dec 2019)
  • About 3.000 downloads. Source: here (Dec 2013)

What you also need to know

Note that another catch with standard code signing certificates is that the certificate reputation will not automatically carry over to a new re-issued certificate (for example when your old certificate has expired). This is true even if the new certificate is based on the same certificate signing request (CSR) as the old one. For this reason, it's strongly recommended to buy a standard code signing certificate which has a long validity term.

As a final note, always make sure that you're timestamping your signed apps. Timestamping is extremely important, as it will allow the signed app to remain valid after the certificate itself has expired. Make sure to use an SHA-2 digest algorithm (e.g. SHA-256) for both the file and the timestamp signatures. Also see this question for further details.

Option 4: Just wait for a long time

If you don't take any measures at all, the Microsoft SmartScreen warning will also go away eventually. This might however take a ridiculous amount of time (months) and / or downloads (tens of thousands). Another big problem is that each time you'll release an updated version of your app, the waiting period will start all over again. So, this probably isn't the solution you're looking for.

Solution 3 - Windows

If you have a standard code signing certificate, some time will be needed for your application to build trust. Microsoft affirms that an Extended Validation (EV) Code Signing Certificate allows us to skip this period of trust-building. According to Microsoft, extended validation certificates will enable the developer to immediately establish a reputation with SmartScreen. Otherwise, the users will see a warning like "Windows Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.", with the two buttons: "Run anyway" and "Don't run".

Another Microsoft resource states the following (quote): "Although not required, programs signed by an EV code signing certificate can immediately establish a reputation with SmartScreen reputation services even if no prior reputation exists for that file or publisher. EV code signing certificates also have a unique identifier which makes it easier to maintain reputation across certificate renewals."

My experience is as follows. Since 2005, we have been using regular (non-EV) code signing certificates to sign .MSI, .EXE and .DLL files with timestamps, and there has never been a problem with SmartScreen until 2018, when there was just one case when it took 3 days for a beta version of our application to build trust since we have released it to beta testers. It was in the middle of the certificate validity period. I don't know what SmartScreen might not like in that specific version of our application, but there have been no SmartScreen complaints since then. Therefore, if your certificate is a non-EV, it is a signed application (such as an .MSI file) that will build trust over time, not a certificate. For example, a certificate can be issued a few months ago and used to sign many files, but for each signed file you publish, it may take a few days for SmartScreen to stop complaining about the file after publishing, as was in our case in 2018.

We didn't submit our software to Microsoft malware analysis. Microsoft started to provide this service in 2017. It may be a viable alternative to an Extended Validation (EV) certificate.

In conclusion, to avoid the warning altogether, i.e., prevent it from happening even suddenly, you need an Extended Validation (EV) code signing certificate, and/or, you can submit your software to Microsoft malware analysis.

Solution 4 - Windows

> UPDATE: Another writeup here: > https://stackoverflow.com/questions/50407893/how-to-add-publisher-in-installshield-2018/50414337#50414337 > (might be better).


I am not too well informed about this issue, but please see if this answer to another question tells you anything useful (and let us know so I can evolve a better answer here): https://stackoverflow.com/questions/48806909/how-to-pass-the-windows-defender-smartscreen-protection That question relates to BitRock - a non-MSI installer technology, but the overall issue seems to be the same.

Extract from one of the links pointed to in my answer above: "...a certificate just isn't enough anymore to gain trust... SmartScreen is reputation based, not unlike the way StackOverflow works... SmartScreen trusts installers that don't cause problems. Windows machines send telemetry back to Redmond about installed programs and how much trouble they cause. If you get enough thumbs-up then SmartScreen stops blocking your installer automatically. This takes time and lots of installs to get sufficient thumbs. There is no way to find out how far along you got."

Honestly this is all news to me at this point, so do get back to us with any information you dig up yourself.


The actual dialog text you have marked above definitely relates to the Zone.Identifier alternate data stream with a value of 3 that is added to any file that is downloaded from the Internet (see linked answer above for more details).


I was not able to mark this question as a duplicate of the previous one, since it doesn't have an accepted answer. Let's leave both question open for now? (one question is for MSI, one is for non-MSI).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAndyView Question on Stackoverflow
Solution 1 - Windowsjay thankiView Answer on Stackoverflow
Solution 2 - Windowsemkey08View Answer on Stackoverflow
Solution 3 - WindowsMaxim MasiutinView Answer on Stackoverflow
Solution 4 - WindowsStein ÅsmulView Answer on Stackoverflow