If your system is set to permit signed installations (see this post) then the solution is to sign your setup.exe with an appropriate certificate.
How do I create a SETUP.EXE that doesn't get blocked by Windows?
I've written a small program using Visual Studio 2019. It is a Visual Basic Windows Forms application. I have no issues running it from Visual Studio. It publishes without errors. If I try to use the Setup.exe that was generated, I am met with an "Application Install - Security Warning" window that tells me that "Your administrator has blocked this application because it potentially poses a security risk to your computer." This is on the same Windows 10 computer that the code was generated on.
I would like to be able to take the SETUP.EXE that was generated and install my application on some of my other PC's.
Why is this happening? What can I do in my Project to correct this and publish a usable SETUP.EXE file?
I am aware that there are registry edits that I could do on my PC that would allow the setup program to work, but I don't want to have to alter settings to get my project to install. I would rather correct the issue in the publishing stage of my project to allow SETUP.EXE to run as any other installer would.
Thank you!
2 answers
Sort by: Most helpful
-
-
Daniel Zhang-MSFT 9,626 Reputation points
2020-10-22T09:10:03.117+00:00 Hi Calab,
First, make sure the following registry keys are enabled:[HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\.NETFramework\Security\TrustManager\PromptingLevel] LocalIntranet = Enabled TrustedSites = Enabled
Then you can try to install it in safe mode.
More details you can refer to this document.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.