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/ - 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
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
Re: [WiX-users] Managed Custom Action using InstallUtilLib.dll
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
Re: [WiX-users] Managed Custom Action using InstallUtilLib.dll
In article [EMAIL PROTECTED], Aris Green [EMAIL PROTECTED] writes: I have been using managec C++ CA's coded in Visual Studio 2003 for installs. IMO, you might as well just use native C++ at that point. Well, you get the picture. One wrinkle, the VC 2005 requires linking to the C++ CRT as a DLL when using .NET. You have to use a manifest when linking to the CRT, so if the same exact version that you built against in your CA is not on the target machine, BAM!. You still tattoo your process using this technique, though. -- 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/ - 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
Re: [WiX-users] Managed Custom Action using InstallUtilLib.dll
I have been using managec C++ CA's coded in Visual Studio 2003 for installs. You create a .NET dll and use unmanaged exports .e.g __declspec(dllexport) int __stdcall MyCustomAction(MSIHANDLE hInstall); All your logic is in the installation package and you don't have to leave a carcass behind with the installed product as you do when using installutil. Well, you get the picture. One wrinkle, the VC 2005 requires linking to the C++ CRT as a DLL when using .NET. You have to use a manifest when linking to the CRT, so if the same exact version that you built against in your CA is not on the target machine, BAM!. You might try writing the CA code in VB .NET, or C#, decompile to IL, augment your class with a static method using an unmanaged export in pure IL, and recompile. I have played around with this a bit in .NET 1.1. Since I am upgrading an installed product for 1.1 to 2.0, I am seriously going to consider this as the C++ CRT DLL with its manifests is one strapping headache, or I might just try to do everything in native code. One thing you can do, which I've done before, is to create a native DLL that embeds the managed assembly as a resource. Extract the assembly, host the CLR in native code, and run your CA. - 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
[WiX-users] Managed Custom Action using InstallUtilLib.dll
Hi All, 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 ___ Yahoo! Answers - Got a question? Someone out there knows the answer. Try it now. http://uk.answers.yahoo.com/ - 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