Hello Karl,
Thank you for your patience on this.
After a lot of testing and investigations, I was finally able to find the root cause of this problem and a solution to it.
Long story short, the problem here is the fact that the custom action DLL is expecting the other DLL (CryptoLicensing) next to it.
At install time, when the custom action is executed, we extract it to a temporary location and execute it from there. When trying to access the function from the CryptoLicensing.dll, the custom action fails because the DLL is not placed next to it.
After having a look over the source code of your custom action's DLL file, it looked like the CryptoLicensing.dll should be contained by the main DLL, since it is added as a reference. However, this does not seem to happen (not sure why - I'd say that this is happening because you are using an older version of WiX).
The solution I've found here is to install the assembly in the
Global Assembly Cache (GAC) so it is available machine-wide.
To do so, please go to
"Assemblies" page -->
"Add Assembly" --> select the
"LogicNP.CryptoLicensing.dll":
- GAC.png (56.75 KiB) Viewed 5322 times
After doing so, everything should be working as expected:
MSI (c) (D4:0C) [09:11:22:951]: Doing action: LoadTrialLicense
Action start 9:11:22: LoadTrialLicense.
MSI (c) (D4:64) [09:11:23:061]: Invoking remote custom action. DLL: C:\Smartviews\SmartViews360.InstallerCA.CA.dll, Entrypoint: LoadTrialLicense
SFXCA: Extracting custom action to temporary directory: C:\Smartviews\SmartViews360.InstallerCA.CA.dll-\
SFXCA: Binding to CLR version v4.0.30319
Calling custom action SmartViews360.InstallerCA!SmartViews360.InstallerCA.CustomActions.LoadTrialLicense
Action ended 9:11:24: LoadTrialLicense. Return value 1.
- trial.png (22.82 KiB) Viewed 5322 times
In addition to that, the VBS custom action may also fail.
Code: Select all
DeleteAFile(Session.Property("APPDIR") & "\Microsoft.Deployment.WindowsInstaller.dll")
DeleteAFile(Session.Property("APPDIR") & "\SmartViews360.InstallerCA.CA.dll")
DeleteAFile(Session.Property("APPDIR") & "\SmartViews360.InstallerCA.dll"
Sub DeleteAFile(filespec)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile(filespec)
End Sub
First of all, a ")" is missing here:
Code: Select all
DeleteAFile(Session.Property("APPDIR") & "\SmartViews360.InstallerCA.dll"
Secondly, please note that the APPDIR property already ends with the "\" character, therefore you may not need to add one more:
Code: Select all
"\Microsoft.Deployment.WindowsInstaller.dll"
"\SmartViews360.InstallerCA.CA.dll"
"\SmartViews360.InstallerCA.dll"
Hope this helps.
Best regards,
Catalin