Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Piping in a little later here, as had no requirements for PowerShell custom actions but now do. Our product team is developing a Server app and require a bunch of PowerShell actions to be ran, some only require triggering commands that are used to log server info, but others are more detailed/complicated. So what I need to know, currently using WiX 3.7, is if it is best for the developers to simply create the PowerShell *.ps1 file or files and therefore I just have to have a custom action that calls them with parameters, or can the PS script be embedded in to the WiX fragments. Again I have no experience with PS and therefore would like to keep it simple or at least have the least amount of failure points in the install? Is there any good examples that show PS custom actions and/or embedding actions within the WiX installer? Thanks. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Is-using-Powershell-script-as-a-Wix-Custom-Action-a-good-idea-tp7584243p7595699.html Sent from the wix-users mailing list archive at Nabble.com. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
The problem with running PowerShell directly is that the default execution policy on many servers is Restricted. Which means not a jot of your script will run. If you can guarantee yourself that you'll always be running on systems with Unrestricted, Signed, or RemoteSigned, then your PowerShell can be executed directly within the restrictions imposed by each execution policy. There is an easier way. If most of your script is cmdlets that integrate with your developers' code, you can write a C# wrapper and call the PowerShell from within. This has the double advantage that it will work even when the execution policy is set to Restricted. -- 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: TimM [mailto:timmay...@smarttech.com] Sent: Monday, July 7, 2014 1:25 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Piping in a little later here, as had no requirements for PowerShell custom actions but now do. Our product team is developing a Server app and require a bunch of PowerShell actions to be ran, some only require triggering commands that are used to log server info, but others are more detailed/complicated. So what I need to know, currently using WiX 3.7, is if it is best for the developers to simply create the PowerShell *.ps1 file or files and therefore I just have to have a custom action that calls them with parameters, or can the PS script be embedded in to the WiX fragments. Again I have no experience with PS and therefore would like to keep it simple or at least have the least amount of failure points in the install? Is there any good examples that show PS custom actions and/or embedding actions within the WiX installer? Thanks. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Is-using-Powershell-script-as-a-Wix-Custom-Action-a-good-idea-tp7584243p7595699.html Sent from the wix-users mailing list archive at Nabble.com. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ 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. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Thanks for the information John. I'll prompt the developers on if they know what modes the servers will be ran under, but I would figure that it would be Restricted. I do not have much/any experience in creating C#, so are you suggesting a wrapper .exe or custom action dll, which would therefore have to be a .msi based custom action dll as we need to pass in/get access to some properties that are entered by the admin during install to be pass into some of these PowerShell commands. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Is-using-Powershell-script-as-a-Wix-Custom-Action-a-good-idea-tp7584243p7595705.html Sent from the wix-users mailing list archive at Nabble.com. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
A C# custom action CA.dll -- 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: TimM [mailto:timmay...@smarttech.com] Sent: Monday, July 7, 2014 2:00 PM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Thanks for the information John. I'll prompt the developers on if they know what modes the servers will be ran under, but I would figure that it would be Restricted. I do not have much/any experience in creating C#, so are you suggesting a wrapper .exe or custom action dll, which would therefore have to be a .msi based custom action dll as we need to pass in/get access to some properties that are entered by the admin during install to be pass into some of these PowerShell commands. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Is-using-Powershell-script-as-a-Wix-Custom-Action-a-good-idea-tp7584243p7595705.html Sent from the wix-users mailing list archive at Nabble.com. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ 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. -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
My personal point of view: write custom actions in native code, statically link the CRT and have as few dependencies on the machine as possible. Actually, best option is to have no custom actions. smile/ On Mon, Mar 11, 2013 at 9:57 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: Which is fine as long as you don't mind the added dependency of .Net. I seem to remember some issues with newer os's not liking the standard .net installer as it is an optional feature of the OS. On Mar 11, 2013, at 9:57 PM, Christopher Painter chr...@iswix.com wrote: Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action agood idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Classification: Public I agree, however for simple installs, yes having no custom actions is best. But, for installs that require more work, i.e. web sites, databases not using custom actions is not easy... There are a lot of things that WIX can't handle. Steve -Original Message- From: Rob Mensching [mailto:r...@robmensching.com] Sent: March-12-13 10:57 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? My personal point of view: write custom actions in native code, statically link the CRT and have as few dependencies on the machine as possible. Actually, best option is to have no custom actions. smile/ On Mon, Mar 11, 2013 at 9:57 PM, Hoover, Jacob jacob.hoo...@greenheck.comwrote: Which is fine as long as you don't mind the added dependency of .Net. I seem to remember some issues with newer os's not liking the standard .net installer as it is an optional feature of the OS. On Mar 11, 2013, at 9:57 PM, Christopher Painter chr...@iswix.com wrote: Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action agood idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- -- -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- -- -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
CA's can be built to target CLR 2.0 and beyond. The dependency / fragility concerns are overblown. .NET just offers too much to be ignored. For vendor extensions and performance sensitive (UI control event DoActions) then native is worth it. From: Rob Mensching r...@robmensching.com Sent: Tuesday, March 12, 2013 9:59 AM To: General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? My personal point of view: write custom actions in native code, statically link the CRT and have as few dependencies on the machine as possible. Actually, best option is to have no custom actions. smile/ On Mon, Mar 11, 2013 at 9:57 PM, Hoover, Jacob jacob.hoo...@greenheck.com wrote: Which is fine as long as you don't mind the added dependency of .Net. I seem to remember some issues with newer os's not liking the standard .net installer as it is an optional feature of the OS. On Mar 11, 2013, at 9:57 PM, Christopher Painter chr...@iswix.com wrote: Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action agood idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Before NETFX 4.0 came out it was not possible to build assemblies that targeted NETFX2.0 and beyond. That means, any packages with old managed custom actions in them that are not updated can fail to install by default on newer operating systems (where NETFX2.0 is not on by default). It is difficult to predict what happens with NETFX5.0 or if there is an NETFX5.0. For example, WiX v2.0 is still used today and it's custom actions continue to work on current operating systems as well as they did back then. You can provide mitigations (like make sure your install/repair/patch/uninstall always happens via a bootstrapper) to get your NETFX in the correct state before your MSI with managed custom actions runs. IMHO, the best way to avoid all the issues is to build native code custom actions with as few dependencies as possible. Really, the native part of that is just saying fewer dependencies. Do as you wish. smile/ DTF exists for those that want to write managed custom actions and it will help you do so *correctly* in environments you control. But if you are doing anything platform-like (such as the WiX toolset smile/) keep in mind the depth of your dependencies because the world out there is mean and nasty and setup is supposed to fix it. I really should turn this into a blog entry. smile/ On Tue, Mar 12, 2013 at 8:08 AM, Christopher Painter chr...@iswix.comwrote: CA's can be built to target CLR 2.0 and beyond. The dependency / fragility concerns are overblown. .NET just offers too much to be ignored. For vendor extensions and performance sensitive (UI control event DoActions) then native is worth it. From: Rob Mensching r...@robmensching.com Sent: Tuesday, March 12, 2013 9:59 AM To: General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? My personal point of view: write custom actions in native code, statically link the CRT and have as few dependencies on the machine as possible. Actually, best option is to have no custom actions. smile/ On Mon, Mar 11, 2013 at 9:57 PM, Hoover, Jacob jacob.hoo...@greenheck.com wrote: Which is fine as long as you don't mind the added dependency of .Net. I seem to remember some issues with newer os's not liking the standard .net installer as it is an optional feature of the OS. On Mar 11, 2013, at 9:57 PM, Christopher Painter chr...@iswix.com wrote: Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action agood idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Hence why I said native was well suited to vendor extensions. The take a dependency argument goes back a long ways. An example would be the Excel approach vs the VS/DevDiv approach. It would make a good blog provided that you cover the pro's and con's of each approach. FWIW, DTF custom actions can easily be decompiled, examined, tweaked,recompiled and reapplied to an MSI. Try doing that with native. :-) From: Rob Mensching r...@robmensching.com Sent: Tuesday, March 12, 2013 10:27 AM To: Christopher Painter chr...@iswix.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Before NETFX 4.0 came out it was not possible to build assemblies that targeted NETFX2.0 and beyond. That means, any packages with old managed custom actions in them that are not updated can fail to install by default on newer operating systems (where NETFX2.0 is not on by default). It is difficult to predict what happens with NETFX5.0 or if there is an NETFX5.0. For example, WiX v2.0 is still used today and it's custom actions continue to work on current operating systems as well as they did back then. You can provide mitigations (like make sure your install/repair/patch/uninstall always happens via a bootstrapper) to get your NETFX in the correct state before your MSI with managed custom actions runs. IMHO, the best way to avoid all the issues is to build native code custom actions with as few dependencies as possible. Really, the native part of that is just saying fewer dependencies. Do as you wish. smile/ DTF exists for those that want to write managed custom actions and it will help you do so *correctly* in environments you control. But if you are doing anything platform-like (such as the WiX toolset smile/) keep in mind the depth of your dependencies because the world out there is mean and nasty and setup is supposed to fix it. I really should turn this into a blog entry. smile/ On Tue, Mar 12, 2013 at 8:08 AM, Christopher Painter chr...@iswix.com wrote: CA's can be built to target CLR 2.0 and beyond. The dependency / fragility concerns are overblown. .NET just offers too much to be ignored. For vendor extensions and performance sensitive (UI control event DoActions) then native is worth it. From: Rob Mensching r...@robmensching.com Sent: Tuesday, March 12, 2013 9:59 AM To: General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? My personal point of view: write custom actions in native code, statically link the CRT and have as few dependencies on the machine as possible. Actually, best option is to have no custom actions. smile/ On Mon, Mar 11, 2013 at 9:57 PM, Hoover, Jacob jacob.hoo...@greenheck.com wrote: Which is fine as long as you don't mind the added dependency of .Net. I seem to remember some issues with newer os's not liking the standard .net installer as it is an optional feature of the OS. On Mar 11, 2013, at 9:57 PM, Christopher Painter chr...@iswix.com wrote: Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action agood idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
I have successfully executed PowerShell scripts as CustomActions in MSI packages. If you MUST use PowerShell, then all of the warnings concerning difficulty in debugging apply. You MUST fully understand the context under which the script is executing (user context, filesystem and registry redirection, etc). If you have alternatives for your CustomAction, then you should use those alternatives. If you are deploying a native application, then write a native CustomAction. If you are deploying a .NET application, then write a .NET CustomAction. If you MUST use PowerShell to perform a task because the API available to you is a cmdlet provided by thirdparty *AND* you have no other way to perform the same task, then and only then is it appropriate to use a PowerShell script as a CustomAction to perform that task. Don't bother writing .NET code to host the PowerShell engine to avoid using a PowerShell script as that is very, very hard to do correctly. Edwin G. Castro Software Developer - Staff Digital Channels Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 6:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Put another way, I think it's more important to fully, and I do mean fully, understand the MSI model including the declarative and transactional aspects. I've seen far too many installers that ignore all this and then do some crap in a .BAT or .VBS file. It's more important to focus on this then argue the finer points of native vs managed code. As Rob once blogged, the strategic considerations remain but DTF has solved the tactical considerations. From: Castro, Edwin G. (Hillsboro) edwin.cas...@fiserv.com Sent: Tuesday, March 12, 2013 12:06 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? I have successfully executed PowerShell scripts as CustomActions in MSI packages. If you MUST use PowerShell, then all of the warnings concerning difficulty in debugging apply. You MUST fully understand the context under which the script is executing (user context, filesystem and registry redirection, etc). If you have alternatives for your CustomAction, then you should use those alternatives. If you are deploying a native application, then write a native CustomAction. If you are deploying a .NET application, then write a .NET CustomAction. If you MUST use PowerShell to perform a task because the API available to you is a cmdlet provided by thirdparty *AND* you have no other way to perform the same task, then and only then is it appropriate to use a PowerShell script as a CustomAction to perform that task. Don't bother writing .NET code to host the PowerShell engine to avoid using a PowerShell script as that is very, very hard to do correctly. Edwin G. Castro Software Developer - Staff Digital Channels Fiserv Office: 503-746-0643 Fax: 503-617-0291 www.fiserv.com -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 6:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ 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_mar ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
cool thanks for the info. our custom actions are typically in native code, so wanted to check out an easy way with a script, will embed the code into a dll itself then. Raghu Microsoft Corp, Redmond. From: Christopher Painter chr...@iswix.com To: General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net; Raghu raghu_ti...@yahoo.com; General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Sent: Monday, March 11, 2013 7:23 PM Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea?
Which is fine as long as you don't mind the added dependency of .Net. I seem to remember some issues with newer os's not liking the standard .net installer as it is an optional feature of the OS. On Mar 11, 2013, at 9:57 PM, Christopher Painter chr...@iswix.com wrote: Check out C# / DTF for managed custom action support instead of PowerShell. I have millions of successful installations logged and failure caused by DTF are extremely rare in WiX 3.6 / 3.7. In WiX 3.5 there was a bug that resulted in a 1% failure rate. From: Hoover, Jacob jacob.hoo...@greenheck.com Sent: Monday, March 11, 2013 8:29 PM To: Raghu raghu_ti...@yahoo.com, General discussion for Windows Installer XML toolset. wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Is using Powershell script as a Wix Custom Action agood idea? I wouldn't, simply because some of the difficulties others have reported as well as introducing another dependency to your installer. A simple C++ CA DLL can be compiled for a minimal footprint and has no dependencies. -Original Message- From: Raghu [mailto:raghu_ti...@yahoo.com] Sent: Monday, March 11, 2013 8:05 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Is using Powershell script as a Wix Custom Action a good idea? Hello Wix users, I have a very simple custom action something on the lines of validating a key as part of setup, the min requirement that the setup to run is on Win2k8 R2+. Now I can achieve the same thing in a dll but I feel its an overkill and is easily achieved in a script, for a while I was pondering over using vbscript until I read the warning in http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx and decided against vbscript. Could folks point out if doing the same in powershell is ok? Thanks., Raghu -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and remains a good choice in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users