When I change both the package type and my DLL to x64 builds at first glance it would seem these are still being run as a 32 bit action?
What makes you think that?
You could try making sure the component the DLL belongs to is marked as "64-bit Component" from the Organization page, then try again see if that worked.
An installed custom action is run against XXX.dll which works OK. Then the 'call function'
Log file looks like...
MSI (s) (D0:70) [20:46:09:845]: Executing op: CustomActionSchedule(Action=InstallPortMonitor,ActionType=3089,Source=C:\Windows\system32\XXX.dll,Target=OnMSIInstall,)
MSI (s) (D0:98) [20:46:09:923]: Invoking remote custom action. DLL: C:\Windows\system32\XXX.dll, Entrypoint: OnMSIInstall
MSI (s) (D0:68) [20:46:09:970]: Generating random cookie.
MSI (s) (D0:68) [20:46:10:017]: Created Custom Action Server with PID 232 (0xE8).
MSI (s) (D0:2C) [20:46:10:079]: Running as a service.
MSI (s) (D0:2C) [20:46:10:110]: Hello, I'm your 64bit Elevated custom action server.
MSI (s) (D0:70) [20:46:10:266]: Executing op: ActionStart(Name=SetConfigFileName,,)
MSI (s) (D0:70) [20:46:10:329]: Executing op: CustomActionSchedule(Action=SetConfigFileName,ActionType=3073,Source=BinaryData,Target=CallStdFcn,CustomActionData=C:\Windows\system32\XXX.dll?D;SetConfigFileNameResult;S;SetConfigFileName;Q;S;I;C:\Program Files\foo\bar\default.xml?)
MSI (s) (D0:84) [20:46:10:360]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI6D1D.tmp, Entrypoint: CallStdFcn
MSI (s) (D0:68) [20:46:10:485]: Generating random cookie.
MSI (s) (D0:68) [20:46:10:532]: Created Custom Action Server with PID 3036 (0xBDC).
MSI (s) (D0:2C) [20:46:10:688]: Running as a service.
MSI (s) (D0:2C) [20:46:10:953]: Hello, I'm your 32bit Elevated custom action server.
MSI (c) (68:CC) [20:46:11:077]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
Error 4111. File not found: C:\Windows\system32\XXX.dll.
MSI (s) (D0!DC) [20:47:14:037]: Product: foo -- Error 4111. File not found: C:\Windows\system32\XXX.dll.
I am afraid the log you are posting does not offer much information as to why this is failing.
Are you sure the DLL is compiled as a 64bit DLL?
Also, please send your .aip project file to support at advancedinstaller dot com so we can further investigate the issue.
I've studied your .aip project file.
Try placing the custom actions after InstallExecute standard action. During InstallExecute all files, including your XXX.dll are installed. Before then, they are not yet installed and the dll can not be found.
Is that really true...? As a 32 bit package this all works perfectly... and whilst the dialog reporting the error is displayed I can do a dir of c:\windows\system32\ and see that the DLL is present and then removed when the dislog is dismissed.
Trying it regardless... exactly the same problem.
Looking at the log extract I sent earlier it says just prior to the error...
MSI (s) (D0:2C) [20:46:10:953]: Hello, I'm your 32bit Elevated custom action server.
Doesn't this mean it's running as 32 bit which implies it won't be able to find the native x64 system32 directory where the .dll is. Even if it did there must be some dark magic going on for it to then to be able to call into the x64 dll where the custom action is...
The custom action launching your dll is currently written for 32bit platforms. Unfortunately this can not launch your 64bit dll.
We will improve this behavior in the future to enable calling functions from 64bit dlls.
GabrielBarbu wrote:The custom action launching your dll is currently written for 32bit platforms. Unfortunately this can not launch your 64bit dll.
We will improve this behavior in the future to enable calling functions from 64bit dlls.
Ouch.
I can't see that they are 32 bit only documented anywhere, if I had seen it then I would have avoided using them... Come to that, why is AI even letting me generate them, isn't AI aware that the target DLL is 64 bit and it won't work?
As I now have 60+ of these custom actions in the full installation that I'll now have to code using native MSI handles and retest just to get a simple installation to work I really have to question if AI is still the right product for us to be using.
Sorry for the bad news. We are definitely planning to implement this support.
There are many things to be done and we do our best to keep up with our customers' needs. Rest assured we have this feature high on our TODO list and will implement it as soon as possible.
FOLLOW US
Get the latest news in Application Packaging