I'm not suggesting using the code in that way, only that any complete example is a roadmap of how to perform a task in terms of the APIs that are called and in what order.
What's the status of DTF these days? Does Microsoft support it? Because whether DTF rocks or not is irrelevant when a company has rules that severely restrict or prohibit distributing 3rd party code or Dlls. Two companies I've been involved with both prohibit any 3rd party code: these are environments where the SDL (security) process matters, where 3rd party code must have a support contract and pass security audits and so on. It's ok to use these types of tools for internal development but shipping them to customers is not allowed. So knowing how to P/Invoke or use native Win32 APIs is necessary. Phil W -----Original Message----- From: Christopher Painter [mailto:chr...@iswix.com] Sent: Tuesday, January 03, 2012 3:10 PM To: General discussion for Windows Installer XML toolset.; General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Querying the package and installed productarchitecture Ok, let's pretend I'm a .NET developer who doesn't know anything about MSI and I follow you're advice of reading through WiExport.vbs to understand the flow of exporting an IDT file. First problem I'm going to hit is trying to add a reference to WindowsInstaller.Installer. Last time I checked the interops (it's been years) won't generate correctly. So I'm going to be writing all kinds of COM Interop wrappers or worse using a ProcessInfo class to shell out of process to the VBscript. Laugh, but I see it done all the time. Or I can just add a reference to Microsoft.Deployment.WindowsInstaller and write: using(Database database = new Database("foo.msi", DatabaseOpenMode.ReadOnly)) { database.ExportAll(@"C:\"); } It's really that easy and as clean as can be. For extra bonus points the using statement will automatically call the Dispose() methods which will in turn clean up all those pesky unmanged handles. For the summary information stream I just say: using( var summaryInformation = new SummaryInfo(@"foo.msi", false)) { summaryInformation. // Intellisense kicks in . } I can now easily see that summaryInformation exposes Author, CharacterCount, CodePage et al. The point is, managed code and DTF rocks. DTF isn't just about writing custom actions, it's an all purpose interop assembly for anything needing to interact with Windows Installer and I find it really, really useful for writing build automation tasks and applications / utilities. If you are writing managed code you should be using it. If you are doing unmanged C++ then use the MSI API. If someone is still writing VBScript instead of PowerShell and VB6 instead of C#/VB.NET I really have to scratch my head and ask..... Why?? I'm not a "purist" I'm just pointing out the fact that the VBS files are 12 years (at least) old and were only samples. Sadly I've seen far too many people treat them as production libraries in their solutions. ---------------------------------------- From: "Wilson, Phil" <phil.wil...@invensys.com> Sent: Tuesday, January 03, 2012 4:44 PM To: "General discussion for Windows Installer XML toolset." <wix-users@lists.sourceforge.net> Subject: Re: [WiX-users] Querying the package and installed productarchitecture I think the sample VBScripts in the SDK are useful to the extent that they describe the flow for folks that aren't familiar with how to use the APIs. Exporting an MSI table with no guidance at all is a pain, but I can see from WiExport.vbs that I open the database, do an OpenView with a Select query, do a View fetch, and then get each record's string data. In this particular SummaryInfo case, WiSumInf.vbs is quite instructive on how to get the SummaryInfo for the Platform. I'm not a language purist to the extent that I'll ignore a working example, whatever language it might be! Phil W -----Original Message----- From: Christopher Painter [mailto:chr...@iswix.com] Sent: Friday, December 30, 2011 5:56 PM To: g...@gocek.org; General discussion for Windows Installer XML toolset.; General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Querying the package and installed productarchitecture It's nearly 2012 and I'd much rather use C# and DTF. Perhaps in 1999 those VBScript files were interesting and useful. I can understand the msi.h / msi.lib is still good for the unmanaged C++ guys out there and is certainly the foundation for DTF but the whole VBScript / ActiveScript / COM / Automation Interface world can RIP for all I care. Same goes for the POS Win32_Product class. ---------------------------------------- From: "Gary Gocek" <g...@gocek.org> Sent: Friday, December 30, 2011 7:28 PM To: "General discussion for Windows Installer XML toolset." <wix-users@lists.sourceforge.net> Subject: Re: [WiX-users] Querying the package and installed productarchitecture There are tools in the Windows SDK (I am currently using v7) that can query an MSI database. Look especially at the vbs scripts, you can invoke them with SQL to query properties and tables. http://msdn.microsoft.com/en-us/library/windows/desktop/aa372865(v=vs.85).as px Gary > -----Original Message----- > From: Alex Ivanoff [mailto:aivan...@vmware.com] > Sent: Friday, December 30, 2011 11:19 AM > To: 'General discussion for Windows Installer XML toolset.' > Subject: Re: [WiX-users] Querying the package and installed > productarchitecture > > > I need to be able to do it programmatically. > > > -----Original Message----- > From: McCain, Jon [mailto:jon.mcc...@inin.com] > Sent: Friday, December 30, 2011 07:31 > To: General discussion for Windows Installer XML toolset. > Cc: McCain, Jon > Subject: Re: [WiX-users] Querying the package and installed product > architecture > > 1. Open the install in Orca > 2. Click View -> Summary Information > 3. The architecture type is listed under Platform. > > Jon > > -----Original Message----- > From: Alex Ivanoff [mailto:aivan...@vmware.com] > Sent: Thursday, December 29, 2011 6:17 PM > To: 'General discussion for Windows Installer XML toolset.' > Subject: [WiX-users] Querying the package and installed > product architecture > > Is there a way to query the MSI package and/or installed product > architecture (x86 vs. x64)? ---------------------------------------------------------------------------- -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@invensys.com. This e-mail and any attachments thereto may be subject to the terms of any agreements between Invensys (and/or its subsidiaries and affiliates) and the recipient (and/or its subsidiaries and affiliates). ---------------------------------------------------------------------------- -- Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Write once. Port to many. Get the SDK and tools to simplify cross-platform app development. Create new or port existing apps to sell to consumers worldwide. Explore the Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join http://p.sf.net/sfu/intel-appdev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@invensys.com. This e-mail and any attachments thereto may be subject to the terms of any agreements between Invensys (and/or its subsidiaries and affiliates) and the recipient (and/or its subsidiaries and affiliates). ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users