Managed custom actions are officially unsupported by Windows Installer because of the way that the CLR 'taints' the process it loads into. You cannot reliably ensure that the correct CLR version is loaded at the correct time. See Rob's blog post http://robmensching.com/blog/archive/2007/04/19/Managed-Code-CustomActions-n o-support-on-the-way-and-heres.aspx.
Yes, it's seriously annoying that the .NET Framework and Visual Studio guide you in the direction of a bad design. The whole Installer hierarchy (and especially ServiceInstaller which duplicates Windows Installer functionality) should be marked Deprecated in my view. What can you do? Unfortunately, the most reliable form of custom actions are native C/C++ DLLs. However, if you can write device drivers I would have thought you could write custom action DLLs. WiX does have support for .NET performance counters in v3 using the PerformanceCategory and PerformanceCounter elements in the Util schema. This is certainly present in build 3304. For v2 you will have to write an appropriate .h and .ini file and use the PerfCounter element. You can use the code for the ParsePerformanceCategoryElement method in v3 - which basically generates the .h and .ini files and dumps them into a custom table - as a template. See src\ext\UtilExtension\UtilCompiler.cs in the source distribution. .NET Framework doesn't provide a way to do this (well, it does, but only if you're prepared to use reflection to invoke it because the members are private). Wix's support currently won't work on NT 4.0 because the APIs LoadPerfCounterTextStrings and UnLoadPerCounterTextStrings are used, not the lodctr.exe program. The APIs were added in Windows 2000. -- Mike Dimmick -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sankaranarayanan Sent: 30 October 2007 18:36 To: Richard; WiX Users Subject: Re: [WiX-users] Managed Custom Action using InstallUtilLib.dll I use custom action for the following operations 1) Read XML Config file and set installer properties 2) Install Device Drivers 3) Loading MOF 4) Setting Windows Service privileges 5) Installing .NET Perf Counters. etc... WiX doesn't support these actions by default. Please let know if you have any approach for the following issue : I am using Managed Custom Action as details in http://blogs.msdn.com/josealmeida/archive/2004/11/08/253831.aspx This approach works like a charm but I didn't quite like the idea of packaging InstallUtilLib.dll file in MSI. Is there a way to use the InstallUtilLib.dll present in the client machine instead of packing it in MSI Binary table as follows <Binary Id="InstallUtil" src="$(var.FrameworkPath)\InstallUtilLib.dll" />. (I have a Lauch Condition to check for .NET Framework presence in the client machine). Thanks, Sankaranarayanan MG ----- Original Message ---- From: Richard <[EMAIL PROTECTED]> To: WiX Users <wix-users@lists.sourceforge.net> Cc: [EMAIL PROTECTED] Sent: Tuesday, 30 October, 2007 10:03:10 AM Subject: Re: [WiX-users] Managed Custom Action using InstallUtilLib.dll In article <[EMAIL PROTECTED]>, Sankaranarayanan <[EMAIL PROTECTED]> writes: > I am using Managed Custom Action [...] What is your custom action doing? The MSDN documentation leads people to believe that they need managed custom actions for all sorts of things that the standard actions and tables already cover. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://www.xmission.com/~legalize/book/download/index.html> Legalize Adulthood! <http://blogs.xmission.com/legalize/> ___________________________________________________________ Want ideas for reducing your carbon footprint? Visit Yahoo! For Good http://uk.promotions.yahoo.com/forgood/environment.html ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users