-1

While clicking on batch file I am getting blue popup window

**Windows protected your PC**

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

enter image description here

I tried to sign the .bat file using https://learn.microsoft.com/en-us/dotnet/framework/tools/signtool-exe, but I am getting error SignTool Error: This file format cannot be signed because it is not recognized.

How I can avoid the this pop window and run it directly?

  • You could turn off SmartScreen. Unless you are the type of person wants to send information about almost every executable file you download, and run, to sombody else, or just runs executable files like batch scripts without having checked, read and understood their contents before doing so! Which one are you? What is the content of the batch file? Can you explain to us what every single part of it does? Are there are any potential problems which could result if it is not run exactly the way the author intended? – Compo Aug 18 '21 at 21:15
  • Are you trying to prevent the popup when you run the script on your computer, or are you trying to prevent other people from getting the popup when they run the script on their computer? They're completely different problems. – SomethingDark Aug 18 '21 at 21:28
  • This popup is triggered by an Alternate data stream `Zone.Identifier` that is appended to the file when it is downloaded from the internet. Alternate data streams can be removed using `Powershell`, or [unblocked](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/unblock-file?view=powershell-7.1), however, there is nothing you can do to prevent the ADS being appended when it is downloaded by another user – T3RR0R Aug 19 '21 at 04:12
  • @SomethingDark I am trying to prevent other people from getting the popup when they run the script on their computer. – Riddhish Bambhroliya Aug 20 '21 at 14:37
  • @T3RR0R - If they sign their code (or submit it for analysis), the pop-up won't appear - https://stackoverflow.com/questions/48946680/how-to-avoid-the-windows-defender-smartscreen-prevented-an-unrecognized-app-fro – SomethingDark Aug 20 '21 at 14:59

1 Answers1

0

My signing certificate was expired, renewed the license and it seems good.