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

Reply via email to