<CustomAction Id="PropCA" Property="UpdateIdentityCA"
Value="&quot;[POWERSHELLEXE] -Version 2.0 -NoProfile -NonInteractive 
-InputFormat None -ExecutionPolicy Bypass -File
&quot;[#UpdateIdentity.ps1]&quot; testhub\ericd Manatee1 &quot;"    />

The above CA has a &quot missing and Execute="immediate" property missing.

--Pavan

-----Original Message-----
From: wixtester [mailto:sangee...@hotmail.com] 
Sent: Tuesday, December 16, 2014 12:14 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] CustomAction to run powershell script

Hi,

    I am trying to run a powershell script in deferred custom action, but it 
fails. The command works when manually run from command prompt.

    <CustomAction Id="PropCA" Property="UpdateIdentityCA"
Value="&quot;[POWERSHELLEXE] -Version 2.0 -NoProfile -NonInteractive 
-InputFormat None -ExecutionPolicy Bypass -File
&quot;[#UpdateIdentity.ps1]&quot; testhub\ericd Manatee1 &quot;"    />
    <CustomAction Id="UpdateIdentityCA" BinaryKey="WixCA"
DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
    
    <InstallExecuteSequence>
      <Custom Action="PropCA" After="ca_Reg_Assembly"></Custom>
      <Custom Action="UpdateIdentityCA" After="PropCA"></Custom>  
    </InstallExecuteSequence>

Log error

MSI (s) (BC:88) [14:58:21:192]: Hello, I'm your 32bit Elevated custom action 
server.
CAQuietExec:  Error 0x80070002: Command failed to execute.
CAQuietExec:  Error 0x80070002: CAQuietExec Failed CustomAction 
UpdateIdentityCA returned actual error code 1603 (note this may not be 100% 
accurate if translation happened inside sandbox) Action ended 14:58:21: 
InstallFinalize. Return value 3.


Thanks!
sangeeta




--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/CustomAction-to-run-powershell-script-tp7598607.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! 
Instantly Supercharge Your Business Reports and Dashboards with Interactivity, 
Sharing, Native Excel Exports, App Integration & more Get technology previously 
reserved for billion-dollar corporations, FREE 
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to