Re: [WiX-users] C# Custom Actions - Renaming Functions
Yes, you'd need to change the entry point (in that one place), but the rest of you installer code would remain the same. The CustomAction@Id does not have to equal the CustomAction@DllEntry. That was the point. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 5:11 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions - Renaming Functions John, I'm not following. I renamed the C# method that has the [CustomAction] attribute on it, so shouldn't that change the DllEntry value in the CustomAction / element? On Wed, Mar 19, 2014 at 6:02 PM, John Cooper jocoo...@jackhenry.com wrote: Is is you. The entry point can be re-used with a new Id: CustomAction Id=CallMeByThisName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / CustomAction Id=CallMeByAnotherName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution
Re: [WiX-users] C# Custom Actions - Renaming Functions
Gotcha. Yeah, I'm unsure as to what is going on. I tried this in a sample project and was unable to reproduce it. The only difference I can think of is the original C# CA project was created with WiX 3.7, but we're on WiX 3.8 now. I created my sample project with 3.8. Other than that, I'm out of ideas as everything looks correct. On Thu, Mar 20, 2014 at 9:27 AM, John Cooper jocoo...@jackhenry.com wrote: Yes, you'd need to change the entry point (in that one place), but the rest of you installer code would remain the same. The CustomAction@Iddoes not have to equal the CustomAction@DllEntry. That was the point. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 5:11 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions - Renaming Functions John, I'm not following. I renamed the C# method that has the [CustomAction] attribute on it, so shouldn't that change the DllEntry value in the CustomAction / element? On Wed, Mar 19, 2014 at 6:02 PM, John Cooper jocoo...@jackhenry.com wrote: Is is you. The entry point can be re-used with a new Id: CustomAction Id=CallMeByThisName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / CustomAction Id=CallMeByAnotherName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech
Re: [WiX-users] C# Custom Actions - Renaming Functions
I assume you've also modified your C# CustomAction to include the updated name and rebuilt it? Do you have a full log available (or at least some of the lines before that where the CA is being extracted). If need be, one could peek into the temp file after extraction and ensure it's using the updated assembly. -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Renaming Functions
Is is you. The entry point can be re-used with a new Id: CustomAction Id=CallMeByThisName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / CustomAction Id=CallMeByAnotherName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Renaming Functions
Yes, I actually started by using ReSharper to rename my CA method, as I have unit tests around all of them. After that I updated all of my wxs files so that they are correct. I backed out the changes for now, but I can try it again later to see what the full log is. I may be able to put together a sample app to illustrate it on GitHub or something. Thanks, Levi On Wed, Mar 19, 2014 at 6:00 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: I assume you've also modified your C# CustomAction to include the updated name and rebuilt it? Do you have a full log available (or at least some of the lines before that where the CA is being extracted). If need be, one could peek into the temp file after extraction and ensure it's using the updated assembly. -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Renaming Functions
John, I'm not following. I renamed the C# method that has the [CustomAction] attribute on it, so shouldn't that change the DllEntry value in the CustomAction / element? On Wed, Mar 19, 2014 at 6:02 PM, John Cooper jocoo...@jackhenry.com wrote: Is is you. The entry point can be re-used with a new Id: CustomAction Id=CallMeByThisName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / CustomAction Id=CallMeByAnotherName BinaryKey=MYCA DllEntry=MyCSharpEntryPoint Execute=immediate / -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Renaming Functions
This may be a silly question, but have you also cleared out your temp directories? Also, did you I think it should be possible to export the DLL using Orca to a file on disk, and then examine it to see what exported functions it has (say, with Dependency Walker). This should settle the question of whether it's the exported function that's the issue or something else. On 19 March 2014 22:07, Levi Wilson l...@leviwilson.com wrote: Yes, I actually started by using ReSharper to rename my CA method, as I have unit tests around all of them. After that I updated all of my wxs files so that they are correct. I backed out the changes for now, but I can try it again later to see what the full log is. I may be able to put together a sample app to illustrate it on GitHub or something. Thanks, Levi On Wed, Mar 19, 2014 at 6:00 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: I assume you've also modified your C# CustomAction to include the updated name and rebuilt it? Do you have a full log available (or at least some of the lines before that where the CA is being extracted). If need be, one could peek into the temp file after extraction and ensure it's using the updated assembly. -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Renaming Functions
John, I did not clear out my temp directories. I assumed everything it built would be underneath my project. I can try though. I did export from Orca and used `dumpbin` to view the exported functions. My newly named method was there. On Wed, Mar 19, 2014 at 7:09 PM, John Ludlow john.ludlow...@gmail.comwrote: This may be a silly question, but have you also cleared out your temp directories? Also, did you I think it should be possible to export the DLL using Orca to a file on disk, and then examine it to see what exported functions it has (say, with Dependency Walker). This should settle the question of whether it's the exported function that's the issue or something else. On 19 March 2014 22:07, Levi Wilson l...@leviwilson.com wrote: Yes, I actually started by using ReSharper to rename my CA method, as I have unit tests around all of them. After that I updated all of my wxs files so that they are correct. I backed out the changes for now, but I can try it again later to see what the full log is. I may be able to put together a sample app to illustrate it on GitHub or something. Thanks, Levi On Wed, Mar 19, 2014 at 6:00 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: I assume you've also modified your C# CustomAction to include the updated name and rebuilt it? Do you have a full log available (or at least some of the lines before that where the CA is being extracted). If need be, one could peek into the temp file after extraction and ensure it's using the updated assembly. -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list
Re: [WiX-users] C# Custom Actions - Renaming Functions
Maybe cached MSI? ___ FireGiant | Dedicated support for the WiX toolset | http://www.firegiant.com/ -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 9:46 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions - Renaming Functions John, I did not clear out my temp directories. I assumed everything it built would be underneath my project. I can try though. I did export from Orca and used `dumpbin` to view the exported functions. My newly named method was there. On Wed, Mar 19, 2014 at 7:09 PM, John Ludlow john.ludlow...@gmail.comwrote: This may be a silly question, but have you also cleared out your temp directories? Also, did you I think it should be possible to export the DLL using Orca to a file on disk, and then examine it to see what exported functions it has (say, with Dependency Walker). This should settle the question of whether it's the exported function that's the issue or something else. On 19 March 2014 22:07, Levi Wilson l...@leviwilson.com wrote: Yes, I actually started by using ReSharper to rename my CA method, as I have unit tests around all of them. After that I updated all of my wxs files so that they are correct. I backed out the changes for now, but I can try it again later to see what the full log is. I may be able to put together a sample app to illustrate it on GitHub or something. Thanks, Levi On Wed, Mar 19, 2014 at 6:00 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: I assume you've also modified your C# CustomAction to include the updated name and rebuilt it? Do you have a full log available (or at least some of the lines before that where the CA is being extracted). If need be, one could peek into the temp file after extraction and ensure it's using the updated assembly. -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Renaming Functions
Cached as in c:\Windows\Installer cached? I uninstalled my previous app to see if a fresh install would do it as well...same problem. On Thu, Mar 20, 2014 at 12:54 AM, Rob Mensching r...@firegiant.com wrote: Maybe cached MSI? ___ FireGiant | Dedicated support for the WiX toolset | http://www.firegiant.com/ -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 9:46 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions - Renaming Functions John, I did not clear out my temp directories. I assumed everything it built would be underneath my project. I can try though. I did export from Orca and used `dumpbin` to view the exported functions. My newly named method was there. On Wed, Mar 19, 2014 at 7:09 PM, John Ludlow john.ludlow...@gmail.com wrote: This may be a silly question, but have you also cleared out your temp directories? Also, did you I think it should be possible to export the DLL using Orca to a file on disk, and then examine it to see what exported functions it has (say, with Dependency Walker). This should settle the question of whether it's the exported function that's the issue or something else. On 19 March 2014 22:07, Levi Wilson l...@leviwilson.com wrote: Yes, I actually started by using ReSharper to rename my CA method, as I have unit tests around all of them. After that I updated all of my wxs files so that they are correct. I backed out the changes for now, but I can try it again later to see what the full log is. I may be able to put together a sample app to illustrate it on GitHub or something. Thanks, Levi On Wed, Mar 19, 2014 at 6:00 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: I assume you've also modified your C# CustomAction to include the updated name and rebuilt it? Do you have a full log available (or at least some of the lines before that where the CA is being extracted). If need be, one could peek into the temp file after extraction and ensure it's using the updated assembly. -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Wednesday, March 19, 2014 4:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Renaming Functions Is it me, or is it impossible to rename a C# custom action function once you've built it? My wxs files are correct to reflect the new name. I have verified that the binary file that is in there has the newly named method after I build it (I saved it from Orca and did `dumpbin saved.dll /EXPORTS` to see it). However, when I go to run the install I get: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action ValidateSQLAdminCredentials, entry: ValidateSQLAdminCredentials, library: C:\Users\VMWARE~1\AppData\Local\Temp\MSI8F83.tmp The one that is reflected isn't even the one that I renamed, but that would be the first time it tried to load my DLL. I've cleared out my bin and obj directories in my CA project as well as my installer project. What am I missing or where can I look to help troubleshoot? I'm using Wix 3.8 -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three
Re: [WiX-users] C# Custom Actions / SQL
Thanks for the responses guys, that helps a lot. John: do you have any blog posts or anything that speaks to how you're deploying databases and such with WiX with SqlPackage.exe? My other post talks about some of the pain I'm having with a very large SQL script (144k lines) and wondering if SqlPackage.exe would alleviate some of that. Thanks, Levi On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri os...@live.com wrote: If they are not in DTF then the WiX toolset doesn’t provide them. It’s assumed that most of what drove you to managed code would already be in the Framework so there isn’t the same level of need to invent the wheel. Having said that, I like John’s reply. Cool system. I’ll have to remember that next time I’m faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C++ that checks for the existence of a database as well as to verify if a particular table exists. For that, I am using the sqlutil.lib to make that easier. In C# custom actions, is there an equivalent or do most people just use SqlConnection / SqlCommand out of the .NET framework? Apologies if this is an obvious question, I just didn't want to re-invent the wheel if WiX had a helper library to assist with this. I didn't see any SQL related classes in DTF. Thanks in advance, Levi -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions / SQL
Well, I'll see if I can throw something together. I can't expose the code, but I can describe the component custom actions and the table in enough detail to make it easy enough to re-implement. The one big gotcha is early releases of the SSDT had versions of SqlPackage.exe that lacked a provision to extend the timeout. This doesn't matter much on a remote deploy if you're only deploying one database, but if you're deploying several, you'll need to extend the timeout by setting a registry entry. We generally set it a 5 minutes (300 seconds) which may be overkill, but works for us. I recommend only use the October 2013 (or later) SSDT package. My technique deploys up to seven databases in this manner. I'm using it in production on eight products currently (and converting an additional product over to it that currently uses SqlScript/SqlString). I'll try to have something up on my blog by Monday. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:21 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks for the responses guys, that helps a lot. John: do you have any blog posts or anything that speaks to how you're deploying databases and such with WiX with SqlPackage.exe? My other post talks about some of the pain I'm having with a very large SQL script (144k lines) and wondering if SqlPackage.exe would alleviate some of that. Thanks, Levi On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri os...@live.com wrote: If they are not in DTF then the WiX toolset doesn't provide them. It's assumed that most of what drove you to managed code would already be in the Framework so there isn't the same level of need to invent the wheel. Having said that, I like John's reply. Cool system. I'll have to remember that next time I'm faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C++ that checks for the existence of a database as well as to verify if a particular table exists. For that, I am using the sqlutil.lib to make that easier. In C# custom actions, is there an equivalent or do most people just use SqlConnection / SqlCommand out of the .NET framework? Apologies if this is an obvious question, I just didn't want to re-invent the wheel if WiX had a helper library to assist with this. I didn't see any SQL related classes in DTF. Thanks in advance, Levi -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg. clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg. clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use
Re: [WiX-users] C# Custom Actions / SQL
Thanks! I was planning on only using it to do my initial schema setup, and have SqlScript do everything else. My current RedGate schema export is 144k and it takes 6 minutes for the C++ CA to parse it :( Just trying to figure out my options. On Fri, Jan 24, 2014 at 9:33 AM, John Cooper jocoo...@jackhenry.com wrote: Well, I'll see if I can throw something together. I can't expose the code, but I can describe the component custom actions and the table in enough detail to make it easy enough to re-implement. The one big gotcha is early releases of the SSDT had versions of SqlPackage.exe that lacked a provision to extend the timeout. This doesn't matter much on a remote deploy if you're only deploying one database, but if you're deploying several, you'll need to extend the timeout by setting a registry entry. We generally set it a 5 minutes (300 seconds) which may be overkill, but works for us. I recommend only use the October 2013 (or later) SSDT package. My technique deploys up to seven databases in this manner. I'm using it in production on eight products currently (and converting an additional product over to it that currently uses SqlScript/SqlString). I'll try to have something up on my blog by Monday. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:21 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks for the responses guys, that helps a lot. John: do you have any blog posts or anything that speaks to how you're deploying databases and such with WiX with SqlPackage.exe? My other post talks about some of the pain I'm having with a very large SQL script (144k lines) and wondering if SqlPackage.exe would alleviate some of that. Thanks, Levi On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri os...@live.com wrote: If they are not in DTF then the WiX toolset doesn't provide them. It's assumed that most of what drove you to managed code would already be in the Framework so there isn't the same level of need to invent the wheel. Having said that, I like John's reply. Cool system. I'll have to remember that next time I'm faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C++ that checks for the existence of a database as well as to verify if a particular table exists. For that, I am using the sqlutil.lib to make that easier. In C# custom actions, is there an equivalent or do most people just use SqlConnection / SqlCommand out of the .NET framework? Apologies if this is an obvious question, I just didn't want to re-invent the wheel if WiX had a helper library to assist with this. I didn't see any SQL related classes in DTF. Thanks in advance, Levi -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg. clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg. clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk
Re: [WiX-users] C# Custom Actions / SQL
There are disadvantages to using this mixed approach. Chief among them is that you inherit SqlScript/SqlString's limitations on default instances if SQL browsing is disabled. I've tested and SqlPackage does not have this limitation. That being said, we do have a mix (particularly to implement ALTER RECOVERY SIMPLE), but we're always moving to merge them back into the main package. Whenever possible, I recommend doing both the schema and data deploy with one method. If you're going to use SqlPackage to deploy the schema, it's not that much harder to have it deploy the default data too. In fact, the schema code runs for us only if: 1) the database doesn't exist; or 2) the schema has changed and can be safely updated. The default data runs only if the data is missing or the scripts decide it is corrupt. We also hae a bunch of scripts run during the package deploy to set roles, logins, and grant permissions. In fact, a lot of these scripts are common to are databases and are shared among. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:40 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks! I was planning on only using it to do my initial schema setup, and have SqlScript do everything else. My current RedGate schema export is 144k and it takes 6 minutes for the C++ CA to parse it :( Just trying to figure out my options. On Fri, Jan 24, 2014 at 9:33 AM, John Cooper jocoo...@jackhenry.com wrote: Well, I'll see if I can throw something together. I can't expose the code, but I can describe the component custom actions and the table in enough detail to make it easy enough to re-implement. The one big gotcha is early releases of the SSDT had versions of SqlPackage.exe that lacked a provision to extend the timeout. This doesn't matter much on a remote deploy if you're only deploying one database, but if you're deploying several, you'll need to extend the timeout by setting a registry entry. We generally set it a 5 minutes (300 seconds) which may be overkill, but works for us. I recommend only use the October 2013 (or later) SSDT package. My technique deploys up to seven databases in this manner. I'm using it in production on eight products currently (and converting an additional product over to it that currently uses SqlScript/SqlString). I'll try to have something up on my blog by Monday. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:21 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks for the responses guys, that helps a lot. John: do you have any blog posts or anything that speaks to how you're deploying databases and such with WiX with SqlPackage.exe? My other post talks about some of the pain I'm having with a very large SQL script (144k lines) and wondering if SqlPackage.exe would alleviate some of that. Thanks, Levi On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri os...@live.com wrote: If they are not in DTF then the WiX toolset doesn't provide them. It's assumed that most of what drove you to managed code would already be in the Framework so there isn't the same level of need to invent the wheel. Having said that, I like John's reply. Cool system. I'll have to remember that next time I'm faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C++ that checks for the existence of a database as well as to verify if a particular table exists. For that, I am using the sqlutil.lib to make that easier. In C# custom actions, is there an equivalent or do most people just use SqlConnection / SqlCommand out of the .NET framework? Apologies if this is an obvious question, I just didn't want to re-invent the wheel if WiX had a helper library to assist with this. I didn't see any SQL related classes in DTF. Thanks in advance, Levi -- CenturyLink Cloud: The Leader
Re: [WiX-users] C# Custom Actions / SQL
I'm fine with using that to do both the schema and initial data deploy with the one method. What I'm unclear/fuzzy are the incremental changes/migrations that we do from release to release. Originally, this was my plan: http://nicholas.piasecki.name/blog/2009/09/running-update-sql-scripts-during-minor-upgrades-with-wix/ I still like the idea of that as it seems easier for me to grok. Thank you so much for your thoughts; you clearly have done this before ;-) On Fri, Jan 24, 2014 at 9:57 AM, John Cooper jocoo...@jackhenry.com wrote: There are disadvantages to using this mixed approach. Chief among them is that you inherit SqlScript/SqlString's limitations on default instances if SQL browsing is disabled. I've tested and SqlPackage does not have this limitation. That being said, we do have a mix (particularly to implement ALTER RECOVERY SIMPLE), but we're always moving to merge them back into the main package. Whenever possible, I recommend doing both the schema and data deploy with one method. If you're going to use SqlPackage to deploy the schema, it's not that much harder to have it deploy the default data too. In fact, the schema code runs for us only if: 1) the database doesn't exist; or 2) the schema has changed and can be safely updated. The default data runs only if the data is missing or the scripts decide it is corrupt. We also hae a bunch of scripts run during the package deploy to set roles, logins, and grant permissions. In fact, a lot of these scripts are common to are databases and are shared among. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:40 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks! I was planning on only using it to do my initial schema setup, and have SqlScript do everything else. My current RedGate schema export is 144k and it takes 6 minutes for the C++ CA to parse it :( Just trying to figure out my options. On Fri, Jan 24, 2014 at 9:33 AM, John Cooper jocoo...@jackhenry.com wrote: Well, I'll see if I can throw something together. I can't expose the code, but I can describe the component custom actions and the table in enough detail to make it easy enough to re-implement. The one big gotcha is early releases of the SSDT had versions of SqlPackage.exe that lacked a provision to extend the timeout. This doesn't matter much on a remote deploy if you're only deploying one database, but if you're deploying several, you'll need to extend the timeout by setting a registry entry. We generally set it a 5 minutes (300 seconds) which may be overkill, but works for us. I recommend only use the October 2013 (or later) SSDT package. My technique deploys up to seven databases in this manner. I'm using it in production on eight products currently (and converting an additional product over to it that currently uses SqlScript/SqlString). I'll try to have something up on my blog by Monday. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:21 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks for the responses guys, that helps a lot. John: do you have any blog posts or anything that speaks to how you're deploying databases and such with WiX with SqlPackage.exe? My other post talks about some of the pain I'm having with a very large SQL script (144k lines) and wondering if SqlPackage.exe would alleviate some of that. Thanks, Levi On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri os...@live.com wrote: If they are not in DTF then the WiX toolset doesn't provide them. It's assumed that most of what drove you to managed code would already be in the Framework so there isn't the same level of need to invent the wheel. Having said that, I like John's reply. Cool system. I'll have to remember that next time I'm faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C
Re: [WiX-users] C# Custom Actions / SQL
Sorry, one caveat to that post is that we will NOT be creating the actual database. It will be empty, and the client sets up the permissions beforehand. On Fri, Jan 24, 2014 at 10:42 AM, Levi Wilson l...@leviwilson.com wrote: I'm fine with using that to do both the schema and initial data deploy with the one method. What I'm unclear/fuzzy are the incremental changes/migrations that we do from release to release. Originally, this was my plan: http://nicholas.piasecki.name/blog/2009/09/running-update-sql-scripts-during-minor-upgrades-with-wix/ I still like the idea of that as it seems easier for me to grok. Thank you so much for your thoughts; you clearly have done this before ;-) On Fri, Jan 24, 2014 at 9:57 AM, John Cooper jocoo...@jackhenry.comwrote: There are disadvantages to using this mixed approach. Chief among them is that you inherit SqlScript/SqlString's limitations on default instances if SQL browsing is disabled. I've tested and SqlPackage does not have this limitation. That being said, we do have a mix (particularly to implement ALTER RECOVERY SIMPLE), but we're always moving to merge them back into the main package. Whenever possible, I recommend doing both the schema and data deploy with one method. If you're going to use SqlPackage to deploy the schema, it's not that much harder to have it deploy the default data too. In fact, the schema code runs for us only if: 1) the database doesn't exist; or 2) the schema has changed and can be safely updated. The default data runs only if the data is missing or the scripts decide it is corrupt. We also hae a bunch of scripts run during the package deploy to set roles, logins, and grant permissions. In fact, a lot of these scripts are common to are databases and are shared among. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:40 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks! I was planning on only using it to do my initial schema setup, and have SqlScript do everything else. My current RedGate schema export is 144k and it takes 6 minutes for the C++ CA to parse it :( Just trying to figure out my options. On Fri, Jan 24, 2014 at 9:33 AM, John Cooper jocoo...@jackhenry.com wrote: Well, I'll see if I can throw something together. I can't expose the code, but I can describe the component custom actions and the table in enough detail to make it easy enough to re-implement. The one big gotcha is early releases of the SSDT had versions of SqlPackage.exe that lacked a provision to extend the timeout. This doesn't matter much on a remote deploy if you're only deploying one database, but if you're deploying several, you'll need to extend the timeout by setting a registry entry. We generally set it a 5 minutes (300 seconds) which may be overkill, but works for us. I recommend only use the October 2013 (or later) SSDT package. My technique deploys up to seven databases in this manner. I'm using it in production on eight products currently (and converting an additional product over to it that currently uses SqlScript/SqlString). I'll try to have something up on my blog by Monday. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Friday, January 24, 2014 8:21 AM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] C# Custom Actions / SQL Thanks for the responses guys, that helps a lot. John: do you have any blog posts or anything that speaks to how you're deploying databases and such with WiX with SqlPackage.exe? My other post talks about some of the pain I'm having with a very large SQL script (144k lines) and wondering if SqlPackage.exe would alleviate some of that. Thanks, Levi On Fri, Jan 24, 2014 at 12:53 AM, Blair Murri os...@live.com wrote: If they are not in DTF then the WiX toolset doesn't provide them. It's assumed that most of what drove you to managed code would already be in the Framework so there isn't the same level of need to invent the wheel. Having said that, I like John's reply. Cool system. I'll have to remember that next time I'm faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years
Re: [WiX-users] C# Custom Actions / SQL
The .NET Framework API's are entirely satisfactory except in terms of error returns. We don't check for he existenece of a database in the custom action code as we deploy to cloaked SQL servers (browsing disabled, servers operating on non-standard, high number ports, no DNS to remote SQL server assumed, etc.) We allow the SQL script to do the detection and handle the case where the database already exists or needs repair. SqlPackage.exe is used for the actual deployment, although .NET framework calls are used to construct and validate the connection string. A master table-driven custom action is then used to deploy one or more databases to one or more instances/connection strings in one pass. -- John Merryweather Cooper Build Install Engineer - ESA Jack Henry Associates, Inc.® Shawnee Mission, KS 66227 Office: 913-341-3434 x791011 jocoo...@jackhenry.com www.jackhenry.com -Original Message- From: Levi Wilson [mailto:l...@leviwilson.com] Sent: Thursday, January 23, 2014 8:33 AM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions / SQL Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C++ that checks for the existence of a database as well as to verify if a particular table exists. For that, I am using the sqlutil.lib to make that easier. In C# custom actions, is there an equivalent or do most people just use SqlConnection / SqlCommand out of the .NET framework? Apologies if this is an obvious question, I just didn't want to re-invent the wheel if WiX had a helper library to assist with this. I didn't see any SQL related classes in DTF. Thanks in advance, Levi -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions / SQL
If they are not in DTF then the WiX toolset doesn’t provide them. It’s assumed that most of what drove you to managed code would already be in the Framework so there isn’t the same level of need to invent the wheel. Having said that, I like John’s reply. Cool system. I’ll have to remember that next time I’m faced with installers populating databases. Blair From: Levi Wilson Sent: Thursday, January 23, 2014 6:37 AM To: General discussion for Windows Installer XML toolset. Being out of the WiX installer world for a handful of years, I was used to writing all of my custom actions in C++. Getting back into this I noticed that it is now acceptable to write them in C# and the DTF. That being said, I have a custom action that is currently written in C++ that checks for the existence of a database as well as to verify if a particular table exists. For that, I am using the sqlutil.lib to make that easier. In C# custom actions, is there an equivalent or do most people just use SqlConnection / SqlCommand out of the .NET framework? Apologies if this is an obvious question, I just didn't want to re-invent the wheel if WiX had a helper library to assist with this. I didn't see any SQL related classes in DTF. Thanks in advance, Levi -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431iu=/4140/ostg.clktrk ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C++ custom actions
Classification: Public Why use C++ use C# :) Here is an example: http://stackoverflow.com/questions/7222782/how-to-get-the-drive-letter-from-a-full-name-of-the-drive Here are two functions I use to GET or SET a windows installer property in C# /// summary /// Sets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=valuestring to populate/param private static void SetSessionProperty(Session session, string propertyName, string value) { try { if (session == null) { throw new ArgumentNullException(session); } session[propertyName] = value; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing SetSessionProperty., ex, true); } } /// summary /// Gets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=isCustomActionDatatrue or false/param /// returnsreturns the windows installer property as a string/returns private static string GetSessionProperty(Session session, string propertyName, bool isCustomActionData) { string sessionProperty = string.Empty; try { if (session == null) { throw new ArgumentNullException(session); } sessionProperty = isCustomActionData ? session.CustomActionData[propertyName] : session[propertyName]; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing GetSessionProperty., ex, true); } return sessionProperty; } -Original Message- From: chintala srinivas [mailto:chentala.srini...@gmail.com] Sent: March-05-13 10:23 AM To: WiX-users@lists.sourceforge.net Subject: [WiX-users] C++ custom actions Hi, I am very new to th C++ customaction. Can any one help me on how to write C++ custom action for finding disk(D:\) is avilable or not. If not then assign c:\ to the property. Regards, Srinivas. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users This message has been marked as Public by Steven Ogilvie. The above classification labels were added to the message by TITUS Message Classification. Visit www.titus.com for more information. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C++ custom actions
Hi Steven, Thank you, As per client requirement I supposed to convert custom actions from C# to C++. The below is C# customaction which I used previously, [CustomAction] public static ActionResult SetPROP(Session session) { try { DriveInfo di = new DriveInfo(D); if (di.DriveType.ToString().Equals(Fixed) (di.IsReady)) { session[PROP1] = D:\\; session[PROP2] = D:; } else { session[PROP1] = C:\\; session[PROP2] = C:; } } catch (Exception ex) { } return ActionResult.Success; } My Properies Property Id=PROP1 Value=D:\ / Property Id=PROP2 Value=D: / Customaction CustomAction Id=SetPROP BinaryKey=CustomActions.dll DllEntry=SetPROP Execute=immediate Return=ignore / In ExecuteSeq Custom Action=SetPROP After=ValidateProductID/ I would like to know how to check disk drives in C++ On Tue, Mar 5, 2013 at 9:02 PM, Steven Ogilvie steven.ogil...@titus.comwrote: Classification: Public Why use C++ use C# :) Here is an example: http://stackoverflow.com/questions/7222782/how-to-get-the-drive-letter-from-a-full-name-of-the-drive Here are two functions I use to GET or SET a windows installer property in C# /// summary /// Sets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=valuestring to populate/param private static void SetSessionProperty(Session session, string propertyName, string value) { try { if (session == null) { throw new ArgumentNullException(session); } session[propertyName] = value; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing SetSessionProperty., ex, true); } } /// summary /// Gets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=isCustomActionDatatrue or false/param /// returnsreturns the windows installer property as a string/returns private static string GetSessionProperty(Session session, string propertyName, bool isCustomActionData) { string sessionProperty = string.Empty; try { if (session == null) { throw new ArgumentNullException(session); } sessionProperty = isCustomActionData ? session.CustomActionData[propertyName] : session[propertyName]; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing GetSessionProperty., ex, true); } return sessionProperty; } -Original Message- From: chintala srinivas [mailto:chentala.srini...@gmail.com] Sent: March-05-13 10:23 AM To: WiX-users@lists.sourceforge.net Subject: [WiX-users] C++ custom actions Hi, I am very new to th C++ customaction. Can any one help me on how to write C++ custom action for finding disk(D:\) is avilable or not. If not then assign c:\ to the property. Regards, Srinivas. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users This message has been marked as Public by Steven Ogilvie. The above classification labels were added to the message by TITUS Message Classification. Visit www.titus.com for more information. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list
Re: [WiX-users] C++ custom actions
Classification: Public Is that not working for you? What does the MSI log file report? Make sure you turn on MSI logging: http://support.microsoft.com/kb/223300 did you look at that C# link? You can use the logic there as well Steve -Original Message- From: chintala srinivas [mailto:chentala.srini...@gmail.com] Sent: March-05-13 10:55 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] C++ custom actions Hi Steven, Thank you, As per client requirement I supposed to convert custom actions from C# to C++. The below is C# customaction which I used previously, [CustomAction] public static ActionResult SetPROP(Session session) { try { DriveInfo di = new DriveInfo(D); if (di.DriveType.ToString().Equals(Fixed) (di.IsReady)) { session[PROP1] = D:\\; session[PROP2] = D:; } else { session[PROP1] = C:\\; session[PROP2] = C:; } } catch (Exception ex) { } return ActionResult.Success; } My Properies Property Id=PROP1 Value=D:\ / Property Id=PROP2 Value=D: / Customaction CustomAction Id=SetPROP BinaryKey=CustomActions.dll DllEntry=SetPROP Execute=immediate Return=ignore / In ExecuteSeq Custom Action=SetPROP After=ValidateProductID/ I would like to know how to check disk drives in C++ On Tue, Mar 5, 2013 at 9:02 PM, Steven Ogilvie steven.ogil...@titus.comwrote: Classification: Public Why use C++ use C# :) Here is an example: http://stackoverflow.com/questions/7222782/how-to-get-the-drive-letter -from-a-full-name-of-the-drive Here are two functions I use to GET or SET a windows installer property in C# /// summary /// Sets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=valuestring to populate/param private static void SetSessionProperty(Session session, string propertyName, string value) { try { if (session == null) { throw new ArgumentNullException(session); } session[propertyName] = value; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing SetSessionProperty., ex, true); } } /// summary /// Gets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=isCustomActionDatatrue or false/param /// returnsreturns the windows installer property as a string/returns private static string GetSessionProperty(Session session, string propertyName, bool isCustomActionData) { string sessionProperty = string.Empty; try { if (session == null) { throw new ArgumentNullException(session); } sessionProperty = isCustomActionData ? session.CustomActionData[propertyName] : session[propertyName]; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing GetSessionProperty., ex, true); } return sessionProperty; } -Original Message- From: chintala srinivas [mailto:chentala.srini...@gmail.com] Sent: March-05-13 10:23 AM To: WiX-users@lists.sourceforge.net Subject: [WiX-users] C++ custom actions Hi, I am very new to th C++ customaction. Can any one help me on how to write C++ custom action for finding disk(D:\) is avilable or not. If not then assign c:\ to the property. Regards, Srinivas. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users This message has been marked as Public by Steven Ogilvie. The above classification labels were added to the message by TITUS Message Classification. Visit www.titus.com for more information. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb
Re: [WiX-users] C++ custom actions
Looks like you would call GetDriveType in kernel32 and see if you get DRIVE_NO_ROOT_DIR http://msdn.microsoft.com/en-gb/library/windows/desktop/aa364939(v=vs.85).asp x -Original Message- From: Steven Ogilvie [mailto:steven.ogil...@titus.com] Sent: 05 March 2013 16:13 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] C++ custom actions Classification: Public Is that not working for you? What does the MSI log file report? Make sure you turn on MSI logging: http://support.microsoft.com/kb/223300 did you look at that C# link? You can use the logic there as well Steve -Original Message- From: chintala srinivas [mailto:chentala.srini...@gmail.com] Sent: March-05-13 10:55 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] C++ custom actions Hi Steven, Thank you, As per client requirement I supposed to convert custom actions from C# to C++. The below is C# customaction which I used previously, [CustomAction] public static ActionResult SetPROP(Session session) { try { DriveInfo di = new DriveInfo(D); if (di.DriveType.ToString().Equals(Fixed) (di.IsReady)) { session[PROP1] = D:\\; session[PROP2] = D:; } else { session[PROP1] = C:\\; session[PROP2] = C:; } } catch (Exception ex) { } return ActionResult.Success; } My Properies Property Id=PROP1 Value=D:\ / Property Id=PROP2 Value=D: / Customaction CustomAction Id=SetPROP BinaryKey=CustomActions.dll DllEntry=SetPROP Execute=immediate Return=ignore / In ExecuteSeq Custom Action=SetPROP After=ValidateProductID/ I would like to know how to check disk drives in C++ On Tue, Mar 5, 2013 at 9:02 PM, Steven Ogilvie steven.ogil...@titus.comwrote: Classification: Public Why use C++ use C# :) Here is an example: http://stackoverflow.com/questions/7222782/how-to-get-the-drive-letter -from-a-full-name-of-the-drive Here are two functions I use to GET or SET a windows installer property in C# /// summary /// Sets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=valuestring to populate/param private static void SetSessionProperty(Session session, string propertyName, string value) { try { if (session == null) { throw new ArgumentNullException(session); } session[propertyName] = value; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing SetSessionProperty., ex, true); } } /// summary /// Gets a windows installer property /// /summary /// param name=sessionSession session/param /// param name=propertyNameMSI property/param /// param name=isCustomActionDatatrue or false/param /// returnsreturns the windows installer property as a string/returns private static string GetSessionProperty(Session session, string propertyName, bool isCustomActionData) { string sessionProperty = string.Empty; try { if (session == null) { throw new ArgumentNullException(session); } sessionProperty = isCustomActionData ? session.CustomActionData[propertyName] : session[propertyName]; } catch (Exception ex) { WriteErrorLogInstall(session, Exception when executing GetSessionProperty., ex, true); } return sessionProperty; } -Original Message- From: chintala srinivas [mailto:chentala.srini...@gmail.com] Sent: March-05-13 10:23 AM To: WiX-users@lists.sourceforge.net Subject: [WiX-users] C++ custom actions Hi, I am very new to th C++ customaction. Can any one help me on how to write C++ custom action for finding disk(D:\) is avilable or not. If not then assign c:\ to the property. Regards, Srinivas. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users This message has been marked as Public by Steven Ogilvie. The above
Re: [WiX-users] C# Custom Actions - Cannot Trace
MMsiBreak worked... Thanks Also for some reason having my PDB in the compilation folder was not enough, even though my symbol paths were pointing to the correct location. To get my break point to trigger I had to copy my PDB to the Windows\Installer\MSI63CB.tmp- folder which is where the DLLs are temporally extracted when running the MSI and manually reload the symbols. Unit Testing: Fully agree with you that the code should be unit tested before. This exercise I am doing is simply learning the ins and outs of writing MSis using WIX and various possibilities Thanks for the tips they are always more than welcomed -Original Message- From: Christopher Painter [mailto:chr...@iswix.com] Sent: February-13-2013 4:56 PM To: General discussion for Windows Installer XML toolset.; wix-users@lists.sourceforge.net Subject: Re: [WiX-users] C# Custom Actions - Cannot Trace For C# using DTF it's MMsiBreak. For C/C++ it's MsiBreak. Also you have to restart the machine after setting the env var for the service control manager to pick up the environment change and pass it along to the Windows Installer service. I've debugged many DTF custom actions it's entirely possible to attach a debugger to the messagebox. That said, I find it easier to unit test the class and then create the custom action class as a very thin veneer around it. Testing inside MSI's is just too much friction for my taste. From: Marc Beaudry mbeau...@matrox.com Sent: Wednesday, February 13, 2013 3:36 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Cannot Trace I am learning to use wix and have come across an issue that doesn't seem to make sense to me. I have created 2 CustomActions one in c++ and one in c#. (Purely for experimental purposes) Both CAs simply contain a MessageBox. (To prove they are being called). And both are called correctly. The difference between the two is I can trace the C++ one but not the C# one. I use attach to process in both cases, but the c# one does not recognize its PDB. Here is what I have tried so far: - Used MSIBreak, nothing happens. But found posts of this issue with Windows 7 not working very well - Tried this too, which should be the proper way to do this but I get nothing. Record record = new Record(2); record[0] = [1]; record[1] = My MSI Message; session.Message(InstallMessage.Info, record); I have searched without any success, I am convinced this is something obvious I am not seeing. How do you attach to a process to be able to trace a c# CA. My message box according to the debugger is running through Run32dll as expected. Thanks for the advice Marc -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# Custom Actions - Cannot Trace
For C# using DTF it's MMsiBreak. For C/C++ it's MsiBreak. Also you have to restart the machine after setting the env var for the service control manager to pick up the environment change and pass it along to the Windows Installer service. I've debugged many DTF custom actions it's entirely possible to attach a debugger to the messagebox. That said, I find it easier to unit test the class and then create the custom action class as a very thin veneer around it. Testing inside MSI's is just too much friction for my taste. From: Marc Beaudry mbeau...@matrox.com Sent: Wednesday, February 13, 2013 3:36 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# Custom Actions - Cannot Trace I am learning to use wix and have come across an issue that doesn't seem to make sense to me. I have created 2 CustomActions one in c++ and one in c#. (Purely for experimental purposes) Both CAs simply contain a MessageBox. (To prove they are being called). And both are called correctly. The difference between the two is I can trace the C++ one but not the C# one. I use attach to process in both cases, but the c# one does not recognize its PDB. Here is what I have tried so far: - Used MSIBreak, nothing happens. But found posts of this issue with Windows 7 not working very well - Tried this too, which should be the proper way to do this but I get nothing. Record record = new Record(2); record[0] = [1]; record[1] = My MSI Message; session.Message(InstallMessage.Info, record); I have searched without any success, I am convinced this is something obvious I am not seeing. How do you attach to a process to be able to trace a c# CA. My message box according to the debugger is running through Run32dll as expected. Thanks for the advice Marc -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# custom actions in windows 2000 not working
The C# custom action library hasn't been tested on Windows 2000 and is not supported on that platform. Sorry. According to http://msdn.microsoft.com/en-us/library/aa368322.aspx, On systems prior to Windows Server 2003, custom actions launched by a DoAction ControlEvent cannot send messages with MsiProcessMessage or Message Method. Logging uses MsiProcessMessage, so that is what you are seeing. (If XP is inconsistent, it's possible that bug got patched in an XP Service Pack.) -Jason- -Original Message- From: hegsie [mailto:[EMAIL PROTECTED] Sent: Thursday, December 04, 2008 12:23 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] C# custom actions in windows 2000 not working Hi I have a couple of C# custom actions written in wix v3, they seem to work fine when they are run on windows XP and 2003 (I haven't tried vista) but when I try to execute these same CA's in Windows 2000 (after the installfinalize action in the InstallExecuteTable) they fail with 'error code 0x80020008' in the log. I have got a CA which runs on the press of a button in one of the dialogs and it seems to get executed fine (returns 1), but the internal dialog that it normally displays is never shown. The other curious thing I've noticed is that the CA's don't write any of the log messages in 2000, but they get written fine in XP or 2003. Has anyone else noticed this behaviour? Is this operation by design? Can C# custom actions be used on Windows 2000? -- View this message in context: http://n2.nabble.com/C--custom-actions-in-windows-2000-not-working-tp1615144p1615144.html Sent from the wix-users mailing list archive at Nabble.com. -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] C# custom actions in windows 2000 not working
Which version of the .NET runtime are you using? Make sure you're not running under 3.0 or newer for Windows 2000. Chris On Thu, Dec 4, 2008 at 3:22 PM, hegsie [EMAIL PROTECTED] wrote: Hi I have a couple of C# custom actions written in wix v3, they seem to work fine when they are run on windows XP and 2003 (I haven't tried vista) but when I try to execute these same CA's in Windows 2000 (after the installfinalize action in the InstallExecuteTable) they fail with 'error code 0x80020008' in the log. I have got a CA which runs on the press of a button in one of the dialogs and it seems to get executed fine (returns 1), but the internal dialog that it normally displays is never shown. The other curious thing I've noticed is that the CA's don't write any of the log messages in 2000, but they get written fine in XP or 2003. Has anyone else noticed this behaviour? Is this operation by design? Can C# custom actions be used on Windows 2000? -- View this message in context: http://n2.nabble.com/C--custom-actions-in-windows-2000-not-working-tp1615144p1615144.html Sent from the wix-users mailing list archive at Nabble.com. -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users