Discussion:
[WiX-users] Silently executing a PowerShell script from WiX Hangs PowerShell
Ryan Taylor
2010-11-09 22:13:09 UTC
Permalink
Note: This question is also posted at http://stackoverflow.com/questions/4138324/silently-executing-a-powershell-script-from-wix-hangs-powershell.

I am trying to silently execute a PowerShell script from a WiX produced MSI. However, anytime I run the installer PowerShell hangs. This in turn hangs the installation process. PowerShell is running the script "properly" in that the script is able to make changes to the system and no errors are reported. Interestingly, if I kill the PowerShell process via Task Manager, the installer cancels the installation and rolls back any changes.

--------------------------------------------------------------------------------
My PowerShell Script
--------------------------------------------------------------------------------
# @param website The website under which the module should be compiled and registered.
# @param name The name of the module to be registered.
# @param assembly The assembly name, version, culture and public key token to be compiled.
# @param assemblyType The fully qualified assemebly type to be registered.

param([string]$website = "website", [string]$name = "name", [string]$assembly = "assembly", [string]$assemblyType= "assemblyType")

import-module webadministration
add-webconfiguration /system.web/compilation/assemblies "IIS:\sites\$website" -Value @{assembly="$assembly"}
new-webmanagedmodule -Name "$name" -Type "$assemblyType" -PSPath "IIS:\sites\$website"
--------------------------------------------------------------------------------

Wix Custom Action Contents : Attempt 1
My first attempt at this was to use the & special character to execute the script
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe&quot; &amp;'C:\Program Files (x86)\My Company\Scripts\register-httpmodule.ps1' -website 'Default Web Site' -name 'MyCustomModule' -assembly 'MyCompany.Product.Feature, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx' -assemblyType 'MyCompany.Product.Feature.MyModule'"
Execute="immediate" />

<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />

<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>
--------------------------------------------------------------------------------

Wix Custom Action Contents : Attempt 2
My second attempt was to use the -File argument to execute the script.
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe&quot; -NoLogo -NonInteractive -NoProfile -File &quot;C:\Program Files (x86)\My Company\Scripts\register-httpmodule.ps1&quot; -website &quot;Default Web Site&quot; -name &quot;MyCustomModule&quot; -assembly &quot;MyCompany.Product.Feature, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx&quot; -assemblyType &quot;MyCompany.Product.Feature.MyModule&quot;"
Execute="immediate" />

<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />

<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>
--------------------------------------------------------------------------------

Both approaches seem to work as they make modifications to the desired web.config file, however, both approaches hang PowerShell and thus the installer.

How do I silently execute a PowerShell script from Wix without hanging PowerShell?

Ryan Taylor
Office (207)-504-5294
***@penbaysolutions.com
www.penbaysolutions.com



CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission, but contact the sender by reply e-mail and destroy all copies of the message and its attachments.
Castro, Edwin G. (Hillsboro)
2010-11-09 23:28:31 UTC
Permalink
In the past I have experienced the same PowerShell hang you are describing but in my experience I never saw any changes made to the system. My tests occurred before CAQuietExec64 existed so I don't know if using CAQuietExec64 would allow the scripts to actually execute now.

I was going to suggest that you use the -NonInteractive parameter but I see you are already using it. I'll try to reproduce the problem on my end. Are you installing a 32-bit MSI on a 64-bit OS?

Edwin G. Castro
Software Developer - Staff
Electronic Banking Services
Fiserv
Office: 503-746-0643
Fax: 503-617-0291
www.fiserv.com
Please consider the environment before printing this e-mail
-----Original Message-----
Sent: Tuesday, November 09, 2010 2:13 PM
Subject: [WiX-users] Silently executing a PowerShell script from WiX Hangs
PowerShell
Note: This question is also posted at
http://stackoverflow.com/questions/4138324/silently-executing-a-
powershell-script-from-wix-hangs-powershell.
I am trying to silently execute a PowerShell script from a WiX produced MSI.
However, anytime I run the installer PowerShell hangs. This in turn hangs the
installation process. PowerShell is running the script "properly" in that the
script is able to make changes to the system and no errors are reported.
Interestingly, if I kill the PowerShell process via Task Manager, the installer
cancels the installation and rolls back any changes.
--------------------------------------------------------------------------------
My PowerShell Script
--------------------------------------------------------------------------------
param([string]$website = "website", [string]$name = "name",
[string]$assembly = "assembly", [string]$assemblyType= "assemblyType")
import-module webadministration
add-webconfiguration /system.web/compilation/assemblies
webmanagedmodule -Name "$name" -Type "$assemblyType" -PSPath
"IIS:\sites\$website"
--------------------------------------------------------------------------------
Wix Custom Action Contents : Attempt 1
My first attempt at this was to use the & special character to execute the script
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell
.exe&quot; &amp;'C:\Program Files (x86)\My Company\Scripts\register-
httpmodule.ps1' -website 'Default Web Site' -name 'MyCustomModule' -
assembly 'MyCompany.Product.Feature, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=xxxxxxxxxxxxxxxx' -assemblyType
'MyCompany.Product.Feature.MyModule'"
Execute="immediate" />
<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT
Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty"
After="InstallFiles">NOT Installed</Custom> </InstallExecuteSequence>
--------------------------------------------------------------------------------
Wix Custom Action Contents : Attempt 2
My second attempt was to use the -File argument to execute the script.
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell
.exe&quot; -NoLogo -NonInteractive -NoProfile -File &quot;C:\Program Files
(x86)\My Company\Scripts\register-httpmodule.ps1&quot; -website
&quot;Default Web Site&quot; -name &quot;MyCustomModule&quot; -
assembly &quot;MyCompany.Product.Feature, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx&quot; -assemblyType
&quot;MyCompany.Product.Feature.MyModule&quot;"
Execute="immediate" />
<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT
Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty"
After="InstallFiles">NOT Installed</Custom> </InstallExecuteSequence>
--------------------------------------------------------------------------------
Both approaches seem to work as they make modifications to the desired
web.config file, however, both approaches hang PowerShell and thus the
installer.
How do I silently execute a PowerShell script from Wix without hanging PowerShell?
Ryan Taylor
Office (207)-504-5294
www.penbaysolutions.com
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please do not read,
disclose, reproduce, distribute, disseminate or otherwise use this
transmission, but contact the sender by reply e-mail and destroy all copies of
the message and its attachments.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a Billion"
shares his insights and actions to help propel your business during the next
growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.
Ryan Taylor
2010-11-10 13:47:53 UTC
Permalink
My current test machine is Windows 7 and it is 64-bit. I am running PowerShell v2 64-bit. I will ultimately be deploying the installer to a Windows 2008 R1 machine, also 64-bit. I think the installer is a 32-bit MSI as I did not specify the Platform attribute in the Package. Although, I am not certain.

Ryan Taylor
Office (207)-504-5294
***@penbaysolutions.com
www.penbaysolutions.com
Date: Tue, 9 Nov 2010 18:28:31 -0500
-----Original Message-----
Subject: Re: [WiX-users] Silently executing a PowerShell script from WiX Hangs
PowerShell
In the past I have experienced the same PowerShell hang you are describing but
in my experience I never saw any changes made to the system. My tests occurred
before CAQuietExec64 existed so I don't know if using CAQuietExec64 would allow
the scripts to actually execute now.
I was going to suggest that you use the -NonInteractive parameter but I see you
are already using it. I'll try to reproduce the problem on my end. Are you
installing a 32-bit MSI on a 64-bit OS?
Edwin G. Castro
Software Developer - Staff
Electronic Banking Services
Fiserv
Office: 503-746-0643
Fax: 503-617-0291
www.fiserv.com
??Please consider the environment before printing this e-mail
-----Original Message-----
Sent: Tuesday, November 09, 2010 2:13 PM
Subject: [WiX-users] Silently executing a PowerShell script from WiX Hangs
PowerShell
Note: This question is also posted at
http://stackoverflow.com/questions/4138324/silently-executing-a-
powershell-script-from-wix-hangs-powershell.
I am trying to silently execute a PowerShell script from a WiX produced MSI.
However, anytime I run the installer PowerShell hangs. This in turn hangs the
installation process. PowerShell is running the script "properly" in that the
script is able to make changes to the system and no errors are reported.
Interestingly, if I kill the PowerShell process via Task Manager, the installer
cancels the installation and rolls back any changes.
--------------------------------------------------------------------------------
My PowerShell Script
--------------------------------------------------------------------------------
and registered.
token to be compiled.
param([string]$website = "website", [string]$name = "name",
[string]$assembly = "assembly", [string]$assemblyType= "assemblyType")
import-module webadministration
add-webconfiguration /system.web/compilation/assemblies
webmanagedmodule -Name "$name" -Type "$assemblyType" -PSPath
"IIS:\sites\$website"
--------------------------------------------------------------------------------
Wix Custom Action Contents : Attempt 1
My first attempt at this was to use the & special character to execute the
script
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell
.exe&quot; &amp;'C:\Program Files (x86)\My Company\Scripts\register-
httpmodule.ps1' -website 'Default Web Site' -name 'MyCustomModule' -
assembly 'MyCompany.Product.Feature, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=xxxxxxxxxxxxxxxx' -assemblyType
'MyCompany.Product.Feature.MyModule'"
Execute="immediate" />
<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT
Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty"
After="InstallFiles">NOT Installed</Custom> </InstallExecuteSequence>
--------------------------------------------------------------------------------
Wix Custom Action Contents : Attempt 2
My second attempt was to use the -File argument to execute the script.
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell
.exe&quot; -NoLogo -NonInteractive -NoProfile -File &quot;C:\Program Files
(x86)\My Company\Scripts\register-httpmodule.ps1&quot; -website
&quot;Default Web Site&quot; -name &quot;MyCustomModule&quot; -
assembly &quot;MyCompany.Product.Feature, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx&quot; -assemblyType
&quot;MyCompany.Product.Feature.MyModule&quot;"
Execute="immediate" />
<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT
Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty"
After="InstallFiles">NOT Installed</Custom> </InstallExecuteSequence>
--------------------------------------------------------------------------------
Both approaches seem to work as they make modifications to the desired
web.config file, however, both approaches hang PowerShell and thus the
installer.
How do I silently execute a PowerShell script from Wix without hanging
PowerShell?
Ryan Taylor
Office (207)-504-5294
www.penbaysolutions.com
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please do not read,
disclose, reproduce, distribute, disseminate or otherwise use this
transmission, but contact the sender by reply e-mail and destroy all copies of
the message and its attachments.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a Billion"
shares his insights and actions to help propel your business during the next
growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission, but contact the sender by reply e-mail and destroy all copies of the message and its attachments.
Ryan Taylor
2010-11-10 15:33:20 UTC
Permalink
Here is a little more information. My PowerShell Script currently prints out version information. When I read the MSI log files I see the following:

MSI (s) (D4:78) [10:26:31:436]: Hello, I'm your 32bit Elevated custom action server.
CAQuietExec64:
CAQuietExec64:
CAQuietExec64: Name : ConsoleHost
CAQuietExec64: Version : 2.0
CAQuietExec64: InstanceId : 62b0349c-8d16-4bd1-94e5-d1fe54a9ff54
CAQuietExec64: UI : System.Management.Automation.Internal.Host.InternalHostUserI
CAQuietExec64: nterface
CAQuietExec64: CurrentCulture : en-US
CAQuietExec64: CurrentUICulture : en-US
CAQuietExec64: PrivateData : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
CAQuietExec64: IsRunspacePushed : False
CAQuietExec64: Runspace : System.Management.Automation.Runspaces.LocalRunspace

At this point the PowerShell process remains running. When I kill the PowerShell process with Task Manager the next few log messages are:

CAQuietExec64: Error 0x80070001: Command line returned an error.
CAQuietExec64: Error 0x80070001: CAQuietExec64 Failed
CustomAction RegisterHttpModulePowerShellProperty returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 10:27:10: InstallFinalize. Return value 3.


Ryan Taylor
Office (207)-504-5294
***@penbaysolutions.com
www.penbaysolutions.com


-----Original Message-----
From: Ryan Taylor [mailto:***@penbaysolutions.com]
Sent: Wednesday, November 10, 2010 8:48 AM
To: wix-***@lists.sourceforge.net
Subject: Re: [WiX-users] Silently executing a PowerShell script from WiX Hangs PowerShell

My current test machine is Windows 7 and it is 64-bit. I am running PowerShell v2 64-bit. I will ultimately be deploying the installer to a Windows 2008 R1 machine, also 64-bit. I think the installer is a 32-bit MSI as I did not specify the Platform attribute in the Package. Although, I am not certain.

Ryan Taylor
Office (207)-504-5294
***@penbaysolutions.com
www.penbaysolutions.com
Date: Tue, 9 Nov 2010 18:28:31 -0500
-----Original Message-----
Subject: Re: [WiX-users] Silently executing a PowerShell script from WiX Hangs
PowerShell
In the past I have experienced the same PowerShell hang you are describing but
in my experience I never saw any changes made to the system. My tests occurred
before CAQuietExec64 existed so I don't know if using CAQuietExec64 would allow
the scripts to actually execute now.
I was going to suggest that you use the -NonInteractive parameter but I see you
are already using it. I'll try to reproduce the problem on my end. Are you
installing a 32-bit MSI on a 64-bit OS?
Edwin G. Castro
Software Developer - Staff
Electronic Banking Services
Fiserv
Office: 503-746-0643
Fax: 503-617-0291
www.fiserv.com
??Please consider the environment before printing this e-mail
-----Original Message-----
Sent: Tuesday, November 09, 2010 2:13 PM
Subject: [WiX-users] Silently executing a PowerShell script from WiX Hangs
PowerShell
Note: This question is also posted at
http://stackoverflow.com/questions/4138324/silently-executing-a-
powershell-script-from-wix-hangs-powershell.
I am trying to silently execute a PowerShell script from a WiX produced MSI.
However, anytime I run the installer PowerShell hangs. This in turn hangs the
installation process. PowerShell is running the script "properly" in that the
script is able to make changes to the system and no errors are reported.
Interestingly, if I kill the PowerShell process via Task Manager, the installer
cancels the installation and rolls back any changes.
--------------------------------------------------------------------------------
My PowerShell Script
--------------------------------------------------------------------------------
and registered.
token to be compiled.
param([string]$website = "website", [string]$name = "name",
[string]$assembly = "assembly", [string]$assemblyType= "assemblyType")
import-module webadministration
add-webconfiguration /system.web/compilation/assemblies
webmanagedmodule -Name "$name" -Type "$assemblyType" -PSPath
"IIS:\sites\$website"
--------------------------------------------------------------------------------
Wix Custom Action Contents : Attempt 1
My first attempt at this was to use the & special character to execute the
script
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell
.exe&quot; &amp;'C:\Program Files (x86)\My Company\Scripts\register-
httpmodule.ps1' -website 'Default Web Site' -name 'MyCustomModule' -
assembly 'MyCompany.Product.Feature, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=xxxxxxxxxxxxxxxx' -assemblyType
'MyCompany.Product.Feature.MyModule'"
Execute="immediate" />
<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT
Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty"
After="InstallFiles">NOT Installed</Custom> </InstallExecuteSequence>
--------------------------------------------------------------------------------
Wix Custom Action Contents : Attempt 2
My second attempt was to use the -File argument to execute the script.
--------------------------------------------------------------------------------
<CustomAction Id="RegisterHttpModulePSCmd"
Property="RegisterHttpModulePowerShellProperty"
Value="&quot;C:\Windows\system32\WindowsPowerShell\v1.0\powershell
.exe&quot; -NoLogo -NonInteractive -NoProfile -File &quot;C:\Program Files
(x86)\My Company\Scripts\register-httpmodule.ps1&quot; -website
&quot;Default Web Site&quot; -name &quot;MyCustomModule&quot; -
assembly &quot;MyCompany.Product.Feature, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=xxxxxxxxxxxxxxxx&quot; -assemblyType
&quot;MyCompany.Product.Feature.MyModule&quot;"
Execute="immediate" />
<CustomAction Id="RegisterHttpModulePowerShellProperty"
BinaryKey="WixCA"
DllEntry="CAQuietExec64"
Execute="deferred"
Return="check"
Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="RegisterHttpModulePSCmd" After="CostFinalize">NOT
Installed</Custom>
<Custom Action="RegisterHttpModulePowerShellProperty"
After="InstallFiles">NOT Installed</Custom> </InstallExecuteSequence>
--------------------------------------------------------------------------------
Both approaches seem to work as they make modifications to the desired
web.config file, however, both approaches hang PowerShell and thus the
installer.
How do I silently execute a PowerShell script from Wix without hanging
PowerShell?
Ryan Taylor
Office (207)-504-5294
www.penbaysolutions.com
This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or distribution is
prohibited. If you are not the intended recipient, please do not read,
disclose, reproduce, distribute, disseminate or otherwise use this
transmission, but contact the sender by reply e-mail and destroy all copies of
the message and its attachments.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a Billion"
shares his insights and actions to help propel your business during the next
growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
https://lists.sourceforge.net/lists/listinfo/wix-users
CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission, but contact the sender by reply e-mail and destroy all copies of the message and its attachments.

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
WiX-users mailing list
WiX-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

CONFIDENTIALITY NOTICE:
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please do not read, disclose, reproduce, distribute, disseminate or otherwise use this transmission, but contact the sender by reply e-mail and destroy all copies of the message and its attachments.
wixNewbie
2010-11-27 23:09:34 UTC
Permalink
Hi,

I am also seeing similar problem. When I run powershell script from CA
using CAQuietExec, the installer hangs.
If I run the powershell script from ExeCommand in custom Action, a console
window pops up and completes the script execution. This however leaves a
powershell.exe process running in the task manager.

I am looking for a solution that does not show dos window in executing
Custom Action using CAQuietExec.

Another problem I noticed which is quite unrelated to the above is the
account under which a custom Action runs. I noticed in TaskManager that a
deferred custom action in the <InstallExecuteSequence> that is sequenced to
run after "InstallFiles" and listed first amongst all other CAs runs under
the user account of user logged into the machine(Administrator in my case).
If I put the same CA later in the sequence, it runs under the SYSTEM
account.
I apologize for lack of knowledge on accounts running the CAs, but can
someone share thoughts on why the user accounts are different when placed at
different sequence of execution or give pointers on best place to lookup for
more info.

Thanks !





thanks.
--
View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Silently-executing-a-PowerShell-script-from-WiX-Hangs-PowerShell-tp5722723p5780635.html
Sent from the wix-users mailing list archive at Nabble.com.
Loading...