This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Knowledge Base
- :
- 64bit Powershell Scripts not running
Subscribe
- Mark as New
- Mark as Read
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
64bit Powershell Scripts not running
64bit Powershell Scripts not running
Summary
64bit Powershell scripts are not running with Installshield.Symptoms
Your 64bit Powershell Custom action is not running correctly. And you have followed the information listed in this article:Calling a PowerShell Custom Action
Cause
Installshield's Powershell Custom Action functionality calls a 32bit version of Powershell.Resolution
You can execute your 64bit powershell script with an Installscript custom action.Create an Installscript Custom action that calls the InstallScript function LaunchApplication().
Use LaunchApplication() to execute the 64bit version of powershell.exe
Here is a code snippet:
Disable(WOW64FSREDIRECTION); LaunchApplication("c:\\windows\\system32\\windowspowershell\\v1.0\\powershell.exe","-ExecutionPolicy unrestricted -File c:\\temp\\test.ps1","",SW_NORMAL,INFINITE,LAAW_OPTION_USE_SHELLEXECUTE|LAAW_OPTION_WAIT|LAAW_OPTION_WAIT_INCL_CHILD);
You'll want to change the part with c:\\temp\\test.ps1 to point to the correct location though.
Additional Information
There is an enhancement request submitted for this feature. It is currently being tracked under #IOJ-1626068.
No ratings