How to: Disable URL activation of ClickOnce applications

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

Typically, a ClickOnce application will launch automatically immediately after it is installed from a Web server. For security reasons, you may decide to disable this behavior, and tell users to launch the application from the Start menu instead. The following procedure describes how to disable URL activation.

This technique can be used only for ClickOnce applications installed on the user's computer from a Web server. It cannot be used for online-only applications, which can be launched only by using their URL. For more information on the difference between online-only and installed applications, see Choosing a ClickOnce Deployment Strategy.

This procedure uses the Windows Software Development Kit (SDK) tool MageUI.exe. For more information on this tool, see MageUI.exe (Manifest Generation and Editing Tool, Graphical Client). You can also perform this procedure using Visual Studio.

Procedure

To disable URL activation for your application

  1. Open your deployment manifest in MageUI.exe. If you have not yet created one, follow the steps in Walkthrough: Manually deploy a ClickOnce application.

  2. Select the Deployment Options tab.

  3. Clear the Automatically run application after installing check box.

  4. Save and sign the manifest.

See also