Modifying an existing setup project to support Office 2010, 32-bit and 64-bit, in Add-in Express 2010
You’ve installed Add-in Express for Office and .NET 2010 and opened your Add-in Express Loader-based COM Add-in project. What to do next to get Office 2010 supported? The very first step is to make changes in the setup project. Here is a step-by-step.
Step 1. PostBuildEvent
This step is required only if DisableUAC.exe mentioned in the PostBuildEvent property of your setup project is missing in {Add-in Express}\Bin. I have listed this step because DisableUAC.exe is not included in Beta 1 of Add-in Express 2010 for Office and .net. In Beta 2, we will add DisableUAC.exe to the Bin folder to avoid this step.
But for now, you need to select your setup project in the Solution Explorer window and edit the PostBuildEvent property as follows:
“{Add-in Express}\Bin\adxpatch.exe” “$(BuiltOutputPath)” /UAC={On or Off}
Here:
- {Add-in Express} is the full path to the installation folder of Add-in Express.
- {On or Off} – choose one of the options. If On, running setup.exe by a non-admin user on Vista/Windows 7/Windows 2008 Server with UAC on will invoke the pup-up dialog asking for administrative privileges. Whether you choose On or Off, this executable patches an .MSI to hide the “For Me” and “For Everyone” choice in your installer. Note that we recommend running the .MSI, not setup.exe, if a standard user installs your add-in.
For the project I tested when writing this article, that string expands to the following one:
“C:\Program Files\Add-in Express\Add-in Express for .NET\Bin\adxpatch.exe” “$(BuiltOutputPath)” /UAC=Off
Step 2. Loader
- Replace Loader\adxloader.dll in your add-in project with {Add-in Express}\Redistributables\adxloader.dll and re-register your project. Assuming that you have a 32-bit Office version installed on your PC, this will allow you to start debugging your project immediately. Note that for XLL UDF projects, the loader file name is constructed as follows: adxloader.{project output name}.dll.
- Copy {Add-in Express}\Redistributables\adxloader64.dll to the Loader folder of the add-in project. If your add-in project contains an XLL module, you have to rename the loader with adxloader64.{project output name}.dll.
- Now add Loader\adxloader64.dll to the Application Folder of the setup project.
Step 3. Registrator
- Remove all custom actions referring to adxloader.dll.
- Add {Add-in Express}\Redistributables\adxregistrator.exe to the Application Folder of the setup project.
- Open the Custom Actions editor and add a new action to the Install, Rollback, Uninstall sections. Use the adxregistrator.exe file as an item for the custom actions.
- Set the following parameters of the custom actions:
- Install
/install=”{assembly name}.dll” /privileges={user OR admin}
- Rollback
/uninstall=”{assembly name}.dll” /privileges={user OR admin}
- Uninstall
/uninstall=”{assembly name}.dll” /privileges={user OR admin}
Good luck!
10 Comments
Step 3 says to “Add {Add-in Express}\Redistributables\adxregistrator.exe to the Application Folder of the setup project.”, but the custom actions instruction steps following refer to the .dll. Is it correct that the .exe should be included and distributed, even though it is not referenced by the custom actions? Thanks.
Thank you, Matt! This was a misprint, it’s now corrected. Yes, you need to use adxregistrator.exe, not adxregistrator.dll.
I found that AddinModule doesn’t work in Windows 7 Home Edition. However It works in Windows 7 Ultimate version.
Hi Sunjay,
We haven’t had such reports previously. You can send me your project for testing to the support e-mail address, see {Add-in Express}\readme.txt. Please make sure your e-mail contains a link to this page. Please clear all debug and release folders to make the attachment size smaller.
Please provide me with answers to the following questions:
– what Office versions (and service packs) are installed on the PCs
– click the designer surface of the add-in module and check the value of the RegisterForAllUsers property in the Properties window
– are you an administrator on those PCs?
– how do install the add-in? do you run .MSI or setup.exe? Is UAC on on those PCs?
Hi guys,
Now that you are out of beta, what is the correct way to setup the PostBuildEvent property in Step 1? I ask because we are getting a lot of problems with registering our Add-in during installation, even after trying to install a few times. When we get the user to manually run adxregistrator from the command line, it works and the add-in loads in Outlook. I’m wondering if it has something to do with this new method in Add-in Express 2010 because when the same users run our older add-in based on Add-in Express 2009, it works as expected during installation. I should add that the PostBuildEvent property is as follows:
“..\..\..\Lib\ADXLoader-Latest\adxpatch.exe” “$(BuiltOuputPath)” /UAC=Off
Thanks for any tips.
“{Add-in Express}\Bin\adxpatch.exe” “$(BuiltOuputPath)” /UAC={On or Off}
Hi Dee,
You need to choose On, if you your add-in is per-machine, that is if you register it for all users on the machine. Otherwise, you choose Off.
> When we get the user to manually run adxregistrator from the command line, it works and the add-in loads in Outlook.
I assume you install a per-machine add-in. If so, make sure that your users run setup.exe when installing the add-in.
Regards from Poland,
Andrei Smolin
Add-in Express Team Leader
I’m using my own installer.
A) It works well on Office 2010 32 bit and Win 7 64 bit.
My installer is simply doing a regsvr32 on the (new) adxloader.dll
B) But it does not work well on Office 2010 64 bit,
although I compiled for AnyCPU.
So in case B),
1- do I need both adxloader.dll and adxloader64.dll ?
2- should I run the regsvr32 on both of these files ?
3- Anything else my installer should do ?
Hi Alain,
1. Yes, you need to have both loaders (the x86 and x64).\Add-in Express folder. Please use the support e-mail address for sending the log to me.
2. Nope. You can use any.
3. Nope. May I see the log file which is generated in case B? It is typically located in the
BTW The adxregistrator.exe utility was developed exactly for such task and included in Add-in Express 2010. Did you try to use it instead?
Hi Andrei! Is this procedure still needed for WiX setup projects? The custom action syntax is quite different and I’m still not certain if this is possible with WiX.
Hello Erik,
The procedure above makes sense only when converting a setup project created using Add-in Express 2009 (and earlier) to Add-in Express 2010 (and above) in order to support Office 2010+. WiX setup projects were not supported by Add-in Express 2009 (and earlier), so the answer is No, this procedure isn’t needed. I suggest that you let Add-in Express generate a new WiX setup project for you and then customize the project by modifying the generated XML manually or using or Designer for WiX Toolset (https://www.add-in-express.com/wix-designer/index.php).