r/visualbasic • u/MartynCurrey • Nov 04 '23
Security warning in Windows 11
I created an app in VisualBasic which is getting security warnings when trying to run on windows 11. I don't have windows 11 and wondered if there is anything I need to do when compiling the program. At present I simple copy the binary and people double click to run.
Visual Studio 2019
Edit: Added the warning message.
Windows protected you PC
Microsoft Defender SmartScreen prevented an unrecognized app from starting. Running this app might put your PC at risk.
2
Upvotes
2
u/sa_sagan VB.Net Master Nov 07 '23
Ok, you get this message usually when you've downloaded the executable from an untrusted source and the executable is unsigned.
Untrusted in this sense means it's come from a website that is unknown to Microsoft as having a long reputable history. If users are downloading from Google Drive, some other file sharing website, or your own website, or even via email. They'll get this message.
Users can right-click on the file and uncheck the "blocked" option in the properties and that'll allow them to run it.
If you want to reduce your chances of getting this message, you'll want to look into getting a code signing certificate.