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