Installation of an application published in Microsoft Visual Studio Express

Marek Fiolka 1 Reputation point

Hello all I just started my adventure with Microsoft Visual Studio Express. Previously, I was programming only in Visual Basic for Application, mainly in Excel. Now i wanted to create my first application that did not require Office. So I created a simple window application. Then I created an installation version of my program (Compile \ publish). Unfortunately, when trying to run setup.exe (or apk1.application) a system window (win 8.1) appears saying "The administrator has blocked this application because it poses a potential threat to your computer's security. Your security settings do not allow this application to be installed on your computer. " I tried to run setup.exe with administrator privileges but it didn't change much. Please help me and tell me what I am doing wrong. What should I change in the system to allow such applications to run? Regards Marek Fiołka ![52119-apk1.jpg][1] [1]: /api/attachments/52119-apk1.jpg?platform=QnA

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
3,816 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Michael Taylor 41,766 Reputation points

    The error you're getting is because the setup you generated isn't signed and your network policies require that setup programs be signed. The fix would be to create a certificate and associate it with the setup program. But how you do that depends on what installer you're using. It sounds like you might be trying to use ClickOnce so the docs on how to sign are here.

    Note also that if you are trying to run this from the INet or a network drive it is also possible Windows has blocked the setup program. You can right click the setup executable and view its properties. Make sure there isn't an option to Unblock the exe. That doesn't seem to be the case here but might also explain the dialog you're getting.

    I would also recommend you don't use VS Express. VS Express was the original, free version of VS. But there is really no reason to use it these days. VS Community is more powerful and also free. It provides all the core features of VS and many that Express doesn't have. This wouldn't change your situation now but would give you more options later. It is also extensible with 1000s of free extensions that can help you out. I would recommend you uninstall Express and install Community.

    1 person found this answer helpful.
    0 comments No comments

  2. Marek Fiolka 1 Reputation point

    Thank you very much for your answer. I have actually used (somewhat unconsciously) ClickOnce. The problem, however, was not the lack of a signature. I noticed a long time ago that such applications, even published by professional companies and properly signed (e.g. VargusGen), did not install on any of the computers I had available. It turned out that the problem was in the registry settings as described [here]( clickonce-trust-prompt-behavior? view = vs-2015 & redirectedfrom = MSDN). After setting the appropriate keys to Enabled, the problem for both my first simple applications and those released by professionals disappeared.

    As for VS Community, is it possible (in free version) to create commercial applications in this environment? I thought this was only possible with VS Express. Let me add that i will never be a full-time programmer. I do something else on a daily basis. Programming is rather my hobby. Sometimes, however, I write something special for which others want to pay. So far I have been developing in VB for Application. Now, however, I have a project to do that is not very suitable for stuffing into Excel. Rather, I have to implement it on some SQL database. So I was looking for a good and free environment that would allow me to create a app and hence my choice was VS Express.