You might want to take a look at the DIFxApp, though I haven't ever used it myself (nor have I ever written/installed a kernel driver). Ref: http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg05576.html
-----Original Message----- From: Marc Beaudry [mailto:mbeau...@matrox.com] Sent: Thursday, July 11, 2013 9:04 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Custom Action syntax Issue Thanks for your reply, The services I am installing are kernel services and not regular services. >From the ServiceInstalll documentation this is not yet supported: ownProcess A Win32 service that runs its own process. shareProcess A Win32 service that shares a process. kernelDriver A kernel driver service. This value is not currently supported by the Windows Installer. systemDriver A file system driver service. This value is not currently supported by the Windows Installer. As for the removal of the installed files, I can simply uninstall the files and manually delete the registry entries for the Kernel service. I am surprised that the only way to pass parameters through a CA is using the MSI handle and the properties from it. I had seen the Handle method but was sure there was a way to pass a value to my CA parameters. I'll change my approach to the problem and use the handle as suggested. Thanks Marc -----Original Message----- From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] Sent: July-11-2013 9:52 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Custom Action syntax Issue You don't/can't. Before elaborating, if you want to install a service then why not use the ServiceInstall/ServiceControl elements which exist today? Getting code right which modifies machine state is hard to do, as you have to handle the install/upgrade/repair/remove operations along with rollbacks. If you are dead set on running your own CA, create a second export on your C++ DLL using the right signature for a CA. Ex: // WiX Header Files: #include <wcautil.h> EXPORT UINT __stdcall InstallServiceCA(MSIHANDLE hInstall) { HRESULT hr = S_OK; UINT er = ERROR_SUCCESS; hr = WcaInitialize(hInstall, " InstallServiceCA "); ExitOnFailure(hr, "Failed to initialize"); WcaLog(LOGMSG_STANDARD, "Initialized."); // Use WcaGetProperty to get your 2 strings from the properties, or WcaReadStringFromCaData (depending on if the CA is deferred) if (InstallService (...)) { hr = WcaSetProperty(InstallServiceCA _Property, Installed); ExitOnFailure(hr, "Failed to SetProperty"); } LExit: er = SUCCEEDED(hr) ? ERROR_SUCCESS : ERROR_INSTALL_FAILURE; return WcaFinalize(er); } // DllMain - Initialize and cleanup WiX custom action utils. extern "C" BOOL WINAPI DllMain( __in HINSTANCE hInst, __in ULONG ulReason, __in LPVOID ) { switch(ulReason) { case DLL_PROCESS_ATTACH: WcaGlobalInitialize(hInst); break; case DLL_PROCESS_DETACH: WcaGlobalFinalize(); break; } return TRUE; } -----Original Message----- From: Marc Beaudry [mailto:mbeau...@matrox.com] Sent: Thursday, July 11, 2013 8:05 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Custom Action syntax Issue Hello All, I have what should be a simple request, even though from all my google searches I cannot get the proper syntax. I can correctly call a custom action without any parameters. I am converting an old Wise MSI to WIX: Essentially in Wise I call my dll with 2 parameters, I really want to mimic this in WIX I have a C++ DLL with this entry point extern "C" __declspec(dllexport) int InstallService(char* pszServiceName, char* pszServiceFileName) In Wix I can't figure out what the complete syntax to call my DLL with these 2 char*, Here is what I figured out so far, which compiles fine but my CA never seems to get called <Binary Id='CustomActionID' src='..\..\Release\CustomActions.dll'/> <CustomAction Id='InstallService' BinaryKey='CustomActionID' DllEntry= 'InstallService' Execute='deferred' Return='ignore'/> <CustomAction Id="InstallServiceData" Return='check' Property="InstallService" Value='MyService, TestService.exe' /> <InstallExecuteSequence> <Custom Action="InstallServiceData" Before="InstallService">NOT Installed</Custom> <Custom Action="InstallService" Before="InstallFinalize">NOT Installed</Custom> </InstallExecuteSequence> Thanks for the help, Marc ---------------------------------------------------------------------------- -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users