999 exit code error when running Remove-MSIapplications version 3.5

Topics: Archive - Deployment Scripts
Jan 23, 2015 at 7:37 PM
I am getting the following error from the logs and wondered if anyone already had the answer.

<![LOG[[Pre-Installation] :: Executing MSI action [Uninstall]...]LOG]!><time="13:47:47.032-420" date="01-22-2015" component="Execute-MSI" context="" type="1" thread="1" file="">
<![LOG[[Pre-Installation] :: [msiexec.exe] is a valid path, continue]LOG]!><time="13:47:47.094-420" date="01-22-2015" component="Execute-Process" context="" type="1" thread="1" file="">
<![LOG[[Pre-Installation] :: Function failed, setting exit code to [999].

Error Record:

Message : The variable cannot be validated because the value is not a valid value for the WorkingDirectory
InnerException :

FullyQualifiedErrorId : ValidateSetFailure
ScriptStackTrace : at Execute-Process<Process>, C:\temp\Entrust92\AppDeployToolkit\AppDeployToolkitMain.ps1: line
                    at Execute-MSI<Process>, C:\temp\Entrust92\AppDeployToolkit\AppDeployToolkitMain.ps1: line 1994
                    at Remove-MSIApplications<Process>, 
                    C:\temp\Entrust92\AppDeployToolkit\AppDeployToolkitMain.ps1: line 2071
                    at <ScriptBlock>, C:\temp\Entrust92\Deploy-Application.ps1: line 124
PositionMessage : At C:\temp\Entrust92\AppDeployToolkit\AppDeployToolkitMain.ps1:2209 char:34
              +             If (-not $WorkingDirectory) { $WorkingDirectory = Split-Path -Path $Path -Par ...
              +                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jan 26, 2015 at 10:39 PM
I REM out this line and now seems to be working

If (-not $WorkingDirectory) { $WorkingDirectory = Split-Path -Path $Path -Par ...