Add-in Express 2010 MSI-based web deployment – ClickTwice :)

Add-in Express provides two basic strategies for deploying its projects: publishing an application via the ClickOnce technology, or deploying it with a traditional setup using the Windows Installer. In case of ClickOnce deployment, your application is published to some centralized location, e.g. a network share, and the user installs it from that location. With Windows Installer deployment, you package the application in an .msi file and distribute that file together with setup.exe, which is used to install the application under the admin account. Under a non-admin user, it is sufficient to run the .msi file directly.

How to choose the right deployment technique

Several factors should be kept in mind when choosing a deployment strategy: user permissions (administrator or standard user), the frequency and means of application updates, and installation requirements.

Let’s consider the pros and cons of each strategy. In general, ClickOnce deployment works fine both for the end-user and the developer. The former gets quick and easy installation and updating while the latter makes less effort to tweak the installation. Add-in Express provides some methods for developers to make their ClickOnce applications self-updated. Though, this part of functionality should be implemented by the developer and depends on the application requirements. As for Windows Installer deployment, it offers greater flexibility and richer UI, a larger set of custom actions and powerful API.  

Now a few words about distribution. With Windows Installer, you add a Setup project to your solution to create a setup file that is distributed to users. The user runs the setup file and goes through the steps of the installation wizard. With ClickOnce, you use the Publish wizard to package your application and publish it to a web-site or network file share; the user installs the application directly from that location in a single step. You may consider ClickOnce to be a more powerful technology as it provides automatic updates via the Internet. But what if to combine both technologies and try to use all the power of Windows Installer and the self-updating feature of ClickOnce! We have endeavored to do this and added a new type of deployment to Add-in Express – MSI-based Web deployment, also known as ClickTwice in privy circles :)

For the summary of all available deployment techniques – ClickOnce, Windows Installer and Add-in Express MSI-based Web deployment technologies, see the comparison table below.

ClickOnce, Windows Installer and Add-in Express MSI-based Web deployment

Feature ClickOnce Windows Installer Add-in Express
MSI-based Web deployment
Update from Web Yes No Yes
Post-installation rollback1 Yes No No
Affects shared components or other applications No Yes Yes
Security permissions granted Grants only permissions necessary for the application (deploying COM add-ins, it always requires Full Trust). Grants Full Trust by default. Grants Full Trust by default.
Security permissions required Internet or Intranet Zone (Full Trust for CD-ROM installation) Standard user or Administrator Standard user or Administrator
Installation-time user interface Single prompt Multipart Wizard Multipart Wizard
Installation of shared files No Yes Yes
Installation of drivers No Yes (with custom actions) Yes (with custom actions)
Installation to Global Assembly Cache No Yes Yes
Installation for multiple users No Yes Yes
Add application to Start menu Yes Yes Yes
Add application to Startup group No Yes Yes
Add application to Favorites menu No Yes Yes
Register file types No Yes Yes
Install time registry access2 Limited Yes Yes
Binary file patching No Yes Yes
Application installation location ClickOnce application cache Changed by the user during the installation Changed by the user during the installation
  1. With ClickOnce, rollback is available in Add/Remove Programs. 
  2. ClickOnce deployment can access HKEY_LOCAL_MACHINE (HKLM) only with Full Trust permissions.

As you see in the table above, there is just one difference between standard deployment via Windows Installer and our ClickTwice technology. It is the capability to automatically update applications developed for Microsoft Office and Internet Explorer with Add-in Express. 

Creating a new setup project

Right click on the project item in the Solution explorer and choose 'Create Setup Project'. In the 'New Setup Project Wizard' dialog, fill in the 'Title', 'Project name', 'Description' and 'Company' fields (optional).

Creating a new setup project

Click the Next button. Now you can enter localization and location of your setup.

Setting localization and location of the setup

Click Finish. A new setup project will be created. If it already exists in the output directory, you will be prompted to overwrite it. When the setup is ready, you will see something similar to the screenshot below.

Solution Explorer

When you open the File System editor of the setup project, you will see the following entries added by the wizard:

File System editor of the setup project

Also you can see some custom actions added to the Custom Actions editor. They run the adxregistrator.exe executable to register / unregister the application on the end-user’s PC.

Custom Actions editor

Now you can build the setup. The following warning may appear while the setup project is being built.

WARNING: File ‘adxloader64.dll’ targeting ‘x64’ is not compatible with the project’s target platform ‘x86’ 

Don't care about the warning. It appears because Add-in Express provides the common setup project for both x86 and x64 platforms. Depending on the user’s permissions, Add-in Express wizard modifies the PostBuildEvent property of the setup project. The following command line can be used:

if the setup is configured to be installed under a standard user:

  “<Add-in Express installation path>\adxpatch.exe” “$(BuiltOuputPath)” /UAC=Off

if the setup is configured to be installed under the administrator:

  “<Add-in Express installation path>\adxpatch.exe” “$(BuiltOuputPath)” /UAC=On

The '/UAC' parameter determines if the UAC popup will appear in Vista or Windows 7 before the installation.

That’s all for now. In the next part of this series we will have a close look at publishing the application.

You may also be interested in:

Add-in Express 2010 MSI-based web deployment: Publishing the application, part 2
Add-in Express 2010 MSI-based web deployment: Managing updates, part 3


  • Erling Madsen says:


    I have (almost)completed a Excel Add-in for sale and distribution. I am looking at your product to manage the command and context menus, as the final element of my project. Another main consideration is the deployment/licencing strategy. I need to control the “licencing” so the users pay for a subscription for a period of time (1 yr). I am considering using InstallShield for it as the install application as a result. How would Add-in express use Click Twice to accomplish this objective without combining it? with InstallShield? Is there a paper on your site that deals with this issue?

    Thanks for your time,

    Sincerely yours,

    Erling Madsen

  • Sergey Grischenko (a member of the Add-in Express team) says:

    Hi Erling,

    Thank you for your interest in our product. ClickTwice doesn’t depend on any installers. All that you need is just to create an .msi database using any third party installer. Then ClickTwice will help you to deploy and update your project via web. Of course, the licensing strategy should be implemented by yourself.
    Now ClickTwice doesn’t support custom actions but this feature will be added in future releases of our products.

  • Ric says:


    How Can i supress “Norton” antivirus scan when they run setup.exe which is a “click twice” installer.

  • Sergey Grischenko (Add-in Express Team) says:

    Hi Ric,

    You need to sign the installer with the valid digital signature.

  • Ric says:


    I am using click twice technology for addin setup, so i am just wondering how can i sign a setup using digital signature and where to get it from.

    Is there any 3rd party digital signature providers or any other way out?

    Kindly suggest.

  • Sergey Grischenko (Add-in Express Team) says:

    Hi Ric,

    You can buy the digital signature here:
    To sign your installer with the digital signature you need to use the valid certificate (‘.pfx’ file) in the ‘Certificate File’ field of the Publish wizard.

  • Ric says:


    Thanks for the link.

    Will the digital signature bought from symantec supress all antiviruses alerts or specifically “Norton” antivirus.

    Please provide information regarding this.

  • Sergey Grischenko (Add-in Express Team) says:

    Hi Ric,

    The digital signature will not suppress anything. Antivirus software will scan your installer silently without the alert.

Post a comment

Have any questions? Ask us right now!