MSI - Custom Action

Add-in Express™ Support Service
That's what is more important than anything else

MSI - Custom Action
 
Emmanuel SELLIER




Posts: 23
Joined: 2016-11-23
Hello,

Does someone ever tried and succeeded in adding custom action in a MSI generated with ADX (Outlook Addin)?
I tried in VBS and a C#+/EXE, but in both case I get an error.
VSB: invalid character at line 1 column 1 (I could not figure out what the problem was, file was present in the Application Folder and correctly unpacked at the time the MSI begins installation)
C#/EXE : DEBUG: Error 1001: Custom Action .... .install did not close 1 MSIHANDLEs.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package.

The purpose of this custom action is to clean the Registry before installing a new version of the Add-In.
And check if the Add-In was not previously disabled by Outlook itself (DisabledItems registry).

Any help / indication on how to procede would be appreciated.

Regards
Posted 13 Dec, 2018 08:39:59 Top
Andrei Smolin


Add-in Express team


Posts: 19138
Joined: 2006-05-11
Hello Emmanuel,

Could you please provide more details about what you do to get this error? and what installation software product are you using? Did you debug the custom action? Is the issue imposed by some problem in it?


Andrei Smolin
Add-in Express Team Leader
Posted 13 Dec, 2018 09:28:55 Top
Emmanuel SELLIER




Posts: 23
Joined: 2016-11-23
Hello Andrei,

We generate the MSI using the Add-In express plugin in VS2017 (Add-In Express / Create Setup Project).
Then we add the Exe file (or the VBS) in the resulting project (file added in Application Folder).
If I unarchive the MSI the Exe file is present.
Then we add a Custom Action (Right click on the MSI project / View Custom Actions) in the Install step, and we select the Exe file.
The Custom Action is added before adxregistrator.exe

The Exe file runs fine in standalone (out of the MSI), but makes the MSI install fail.

We tried to debug the install with msiexec command, but it's not really talkative... only the error mentioned in my previous post.
I tried with an empty main() in the Exe... same error.

The idea is to make a clean of the Registry in case the add-in was disabled or if the user messed it up or for any other reason...
Since our users are individuals, it's quite difficult to diagnose the problems they may encounter when installing/updating our add-in. But we are quite sure the Registry is one of the main cause.

Not sure this information will help you.
Posted 13 Dec, 2018 10:08:06 Top
Andrei Smolin


Add-in Express team


Posts: 19138
Joined: 2006-05-11
Hello Emmanuel,

The first page of the setup project wizard allows choosing the installation software product to use when creating a new setup project. I assume this is the Visual Studio Installer in your case; please confirm.

What value do you have for the InstallerClass property of the custom action? See View | Editor | Custom Actions in the main menu.


Andrei Smolin
Add-in Express Team Leader
Posted 14 Dec, 2018 06:37:48 Top
Emmanuel SELLIER




Posts: 23
Joined: 2016-11-23
Hi Andrei,

Yes, sorry, we use the standard Visual Studio Install.

The InstallerClass is set to True.
I guess the problem is there...
I switched this to False. And... it works!

So simple... Thanks a lot Andrei!

Emmanuel
Posted 14 Dec, 2018 07:21:20 Top
Andrei Smolin


Add-in Express team


Posts: 19138
Joined: 2006-05-11
Great!


Andrei Smolin
Add-in Express Team Leader
Posted 14 Dec, 2018 07:34:06 Top