Castro, Edwin (Hillsboro) wrote:
> I've seen many people report that they are running powershell custom actions 
> successfully but I can't seem to find any examples of how they do it. My goal 
> is to run powershell silently.
> [...SNIP...]
> When I run my installer I notice that the progress bar moves to about halfway 
> then stops moving. I can see the powershell process in task manager but it is 
> not using up any CPU. When I look at the log file (installer is still 
> "running") I see the following as the last lines of the log:
>
> MSI (s) (B4:10) [11:33:19:092]: Executing op: ActionStart(Name=PSCmd,,)
> MSI (s) (B4:10) [11:33:19:136]: Executing op: 
> CustomActionSchedule(Action=PSCmd,ActionType=1025,Source=BinaryData,Target=CAQuietExec,CustomActionData="C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"
>  C:\InstallDir\SampleScript.ps1)
>   
Looks to me as though your custom action is trying to run:
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" 
C:\InstallDir\SampleScript.ps1

I think Powershell needs the "-File" argument to specify a script to run 
on the command line.  Try
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -File 
C:\InstallDir\SampleScript.ps1
  
Are you aware that Powershell doesn't support running scripts by 
default?  I'd suggest you open Powershell and type:
   help about_signing
   help Set-ExecutionPolicy

Your installer would be relying on the user to have *manually* set their 
Powershell execution policy to something other than the default.

Best regards,


Andrew

-- 
Andrew Lee                  Solarflare Communications
mailto:a...@solarflare.com  Block 2, Second floor, Westbrook Centre
tel:+44-1223-518040 x5507   Milton Road, Cambridge, CB4 1YG, UK
fax:+44-1223-464225         http://www.solarflare.com/


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to