PowerShell Error while Installing AppFabric
-
Wednesday, August 08, 2012 9:46 PM
So far, I have been unsuccessful in finding something that will address the following AppFabric installation error. While the "final" error code that bubbles up in Windows Installer is 1603, a look a the log file appears to indicate that the underlying issue might be related to a PowerShell custom action.
MSI (s) (28:18) [17:36:08:631]: Executing op: ActionStart(Name=Env_PSModulePath_powershell_i,,) MSI (s) (28:18) [17:36:08:631]: Executing op: CustomActionSchedule(Action=Env_PSModulePath_powershell_i,ActionType=3090,Source=C:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.InstallHelper.exe,Target=powershell.exe "-command \"$str = [System.Environment]::GetEnvironmentVariable(\\\"PSModulePath\\\", [System.EnvironmentVariableTarget]::Machine); $str = $str+\\\";C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\\\"; C:\Windows\system32\setx.exe /M PSModulePath \\\"$str\\\"\"" "C:\Users\UserName\AppData\Local\Temp\AppServerSetup1_1_CustomActions(2012-08-08 17-35-48).log",) MSI (s) (28:18) [17:36:09:341]: Note: 1: 1722 2: Env_PSModulePath_powershell_i 3: C:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.InstallHelper.exe 4: powershell.exe "-command \"$str = [System.Environment]::GetEnvironmentVariable(\\\"PSModulePath\\\", [System.EnvironmentVariableTarget]::Machine); $str = $str+\\\";C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\\\"; C:\Windows\system32\setx.exe /M PSModulePath \\\"$str\\\"\"" "C:\Users\UserName\AppData\Local\Temp\AppServerSetup1_1_CustomActions(2012-08-08 17-35-48).log" CustomAction Env_PSModulePath_powershell_i returned actual error code 1 (note this may not be 100% accurate if translation happened inside sandbox) MSI (s) (28:18) [17:36:09:342]: Product: AppFabric 1.1 for Windows Server -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action Env_PSModulePath_powershell_i, location: C:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.InstallHelper.exe, command: powershell.exe "-command \"$str = [System.Environment]::GetEnvironmentVariable(\\\"PSModulePath\\\", [System.EnvironmentVariableTarget]::Machine); $str = $str+\\\";C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\\\"; C:\Windows\system32\setx.exe /M PSModulePath \\\"$str\\\"\"" "C:\Users\UserName\AppData\Local\Temp\AppServerSetup1_1_CustomActions(2012-08-08 17-35-48).log" Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor. Action Env_PSModulePath_powershell_i, location: C:\Program Files\AppFabric 1.1 for Windows Server\Microsoft.ApplicationServer.InstallHelper.exe, command: powershell.exe "-command \"$str = [System.Environment]::GetEnvironmentVariable(\\\"PSModulePath\\\", [System.EnvironmentVariableTarget]::Machine); $str = $str+\\\";C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\\\"; C:\Windows\system32\setx.exe /M PSModulePath \\\"$str\\\"\"" "C:\Users\UserName\AppData\Local\Temp\AppServerSetup1_1_CustomActions(2012-08-08 17-35-48).log"
I did notice that this system had the exact same PSModulePath formatting error described here, but fixing that did not address this install problem (which did not surprise me too much, as the above error differs from the one described in that thread).
The CustomActions log file contained the following information:
EXEPATH=powershell.exe PARAMS=-command "$str = [System.Environment]::GetEnvironmentVariable(\"PSModulePath\", [System.EnvironmentVariableTarget]::Machine); $str = $str+\";C:\Program Files\AppFabric 1.1 for Windows Server\PowershellModules\"; C:\Windows\system32\setx.exe /M PSModulePath \"$str\"" LOGFILE=C:\Users\UserName\AppData\Local\Temp\AppServerSetup1_1_CustomActions(2012-08-09 08-38-02).log Error: ERROR: Invalid syntax. Default option is not allowed more than '2' time(s). Error: Type "SETX /?" for usage. ExitCode=1
Suggestions?
Thank you,
Matthew
All Replies
-
Thursday, August 09, 2012 2:25 PM
Apparently this issue is related to an improper handling of quotes. This blog posting describes some details of improper handling of quotes in a different scenario. ever, the AppFabric installer completely failed in handling those quotes, causing the installtion to abort.
To work around the issue, I removed all quotes from the PSModulePath environment variable, and then AppFabric installed without failing.
- Marked As Answer by mesheets Thursday, August 09, 2012 2:25 PM
-
Friday, September 14, 2012 10:10 PM
I cannot thank you enough. I've been battling with this exact same issue for weeks.
THANK YOU!

