Exit Code 60008 Before Attempting Actions in AppDeployToolkit

Hello All,

I have been lurking and watching PSAppDeployToolkit for a long time and have used it off and on but never really had a lot of luck with it. For what I am wanting to do now I think this would be a great use for it. I want to uninstall a newer version of Omnissa Horizon Client and roll it back to an older version for technical reason. The problem I am running into is that the installation can begin in Software Center (SCCM 2503) everything looks to be correct in the installation program command line like so:

Prepared command line: "C:\WINDOWS\ccmcache\2o\Invoke-AppDeployToolkit.exe" -DeploymentType "Install"

Executing Command line: "C:\WINDOWS\ccmcache\2o\Invoke-AppDeployToolkit.exe" -DeploymentType "Install" with user context

Working directory C:\WINDOWS\ccmcache\2o

Post install behavior is BasedOnExitCode

Waiting for process 4704 to finish. Timeout = 120 minutes.

Process 4704 terminated with exitcode: 60008

Looking for exit code 60008 in exit codes table...

Unmatched exit code (60008) is considered an execution failure.

App enforcement completed (7 seconds) for App DT "Omnissa Horizon Client 2506.0 Rollback"

I have tried looking through the issues here on the forum regarding this problem and still not having any luck. I even downloaded a new template that is up to version 4.1.7 and still run into the problem. This does not even proceed to where PSADT will start the log in C:\Windows\Logs\Software

Any guidance/assistance would be greatly appreciated.

60008 happens when it can't import the PSADT module.

Q: why is this running in user context? Does this app need to be installed in the user's profile?

I have it set to install whether or not a user is logged in via the Application settings in the SCCM Application. Is there anything that I can show you that would point to the cause?

Try to install it without SCCM on a test machine first.

If it works, then it's a SCCM issue.
If not, then it's PSADT issue.

Should I try to run it via the exe or ps1 file?

When I try to run the Invoke-AppDeployToolkit.ps1 I get this:

Open-ADTSession : Cannot process argument transformation on parameter 'AppProcessesToClose'. 
Cannot convert value "System.Collections.Hashtable" to type "PSADT.ProcessManagement.ProcessDefinition". 
Error: "Unable to cast object of type 'System.Object[]' to type 'System.String'."
At C:\windows\ccmcache\2m\Invoke-AppDeployToolkit.ps1:342 char:35
+     $adtSession = Open-ADTSession @adtSession @iadtParams -PassThru
+                                   ~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Open-ADTSession], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Open-ADTSession

Something is wrong with what you've done to $adtSession
specifically the value you assigned to AppProcessesToClose

This is in the Variables section:

$adtSession = @{
    # App variables.
    AppVendor = 'Omnissa, LLC'
    AppName = 'Omnissa Horizon Client'
    AppVersion = ''
    AppArch = ''
    AppLang = 'EN'
    AppRevision = '01'
    AppSuccessExitCodes = @(0)
    AppRebootExitCodes = @(1641, 3010)
    AppProcessesToClose = @(@{ Name = 'horizon-client','horizon_client_service' ; Description = 'Omnissa Horizon Client' })  # Example: @('excel', @{ Name = 'winword'; Description = 'Microsoft Word' })
    AppScriptVersion = '1.0.0'
    AppScriptDate = '2025-12-04'
    AppScriptAuthor = ''
    RequireAdmin = $true

This is what I have in the Pre-Install

## Show Welcome Message, close processes if specified, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt.
    $saiwParams = @{
        AllowDefer = $false
        DeferTimes = 3
        CheckDiskSpace = $false
        PersistPrompt = $false
    }
    if ($adtSession.AppProcessesToClose.Count -gt 0)
    {
        $saiwParams.Add('CloseProcesses', $adtSession.AppProcessesToClose)
    }

I think I figured out why it was causing an issue with the code here:

  ##================================================
    ## MARK: Pre-Install
    ##================================================
    $adtSession.InstallPhase = "Pre-$($adtSession.DeploymentType)"

    ## Show Welcome Message, close processes with a 900 seconds countdown before automatically closing. 
    ## Switch to $true to allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt.
    $saiwParams = @{
        CloseProcessesCountdown = 900
        AllowDefer = $false
        DeferTimes = 3
        CheckDiskSpace = $false
        PersistPrompt = $false
    }
    if ($adtSession.AppProcessesToClose.Count -gt 0)
    {
        $saiwParams.Add('CloseProcesses', $adtSession.AppProcessesToClose)
    }
    Show-ADTInstallationWelcome @saiwParams

Now without the @saiwParams here with the Show-ADTInstallationWelcome it works.
Show-ADTInstallationWelcome

Testing on a separate system I cannot get it to run successfully via the Invoke-AppDeployToolkit.exe or .PS1 file.

I believe the error is actually in this line of your script:

AppProcessesToClose = @(@{ Name = 'horizon-client','horizon_client_service' ; Description = 'Omnissa Horizon Client' })  # Example: @('excel', @{ Name = 'winword'; Description = 'Microsoft Word' })

I believe the Description has a 1-2-1 relationship with the Name, in your code you have 2 process Names but one Description, So, as you are trying to close two processes I would suggest this line in your code should look something like this:

AppProcessesToClose = @(@{ Name = 'horizon-client'; Description = 'Omnissa Horizon Client' },@{ Name = 'horizon_client_service'; Description = 'Omnissa Horizon Client Service' })  # Example: @('excel', @{ Name = 'winword'; Description = 'Microsoft Word' })

N.B. Just to be aware I read a separate conversation on this forum recently about not using this function to close Windows Services as it was not designed to close Services and may create unintended consequences.
Here: Show-ADTInstallationWelcome not working with closing db2mgmtsvc - #3 by mjr4077au

1 Like

Adrian,

Thank you for the heads up, I will take a look at this and rework the installation script to see if I can get better results. I will also look at the recommendation of using StopADTDependentProcesses.

1 Like

I have resolved this issue.

The problem was due to a version mismatch between the Invoke-AppDeployToolkit.ps1 and the rest of the toolkit since I had copied and pasted code from a newer Invoke-AppDeployToolkit.ps1 (4.1.7) and copied it to another Invoke-AppDeployToolkit.ps1 with the rest of the code in the total package being based on 4.1.3.

2 Likes