60002 with installation failed with toolkit 3.8.4

Today I used the latest template PSAppDeployToolkit_v3.8.4 for package. But I found an strange issue.
I set False in AppDeployToolkitConfig.xml file to have a try to test if user without admin right could be run this package or not.
<Toolkit_RequireAdmin>False</Toolkit_RequireAdmin>

I packaged it and run it in my 2 different PC2. PC A is with admin righ. PC B is just a normal user admin righ.
Test1: on PC A, Open Deploy-Application.ps1 with powershell with admin right, and run, it has no problem.
Test 2: on PC A, Open Deploy-Application.ps1 with powershell without admin or directly double click on Deploy-Application.exe, it failed with below error code 60002.
Test 3: on PC B, just directly double click on Deploy-Application.exe or open Deploy-Application.ps1 with powershell without admin right, it is OK to run.

#Below is the script which I used for run, it was OK to run when the user has admin right, but recently our team would have plan to remove the admin right on user’s PC, that’s why I’m doing this test. And I found the latest template is upcoming, so I downloaded the new template for test.

            WriteToLog -message "$dirfiles\hwFlux2020.1_win64.exe found" -task $pendingtask -severity "info"
            $CmdLineParameters = "-i silent -DUSER_INSTALL_DIR=C:\\Altair\\2020 -DACCEPT_EULA=YES"
            WriteToLog -message "Run $dirfiles\hwFlux2020.1_win64.exe $CmdLineParameters ..." -task $pendingtask -severity "info"
            $ReturnStatus = Execute-Process -Path "$dirfiles\hwFlux2020.1_win64.exe" -Parameters "$CmdLineParameters" -ContinueOnError $true -PassThru
            $SetupExitCode = $ReturnStatus.ExitCode
            If (($SetupExitCode -ne 0) -And ($SetupExitCode -ne 3010) -And ($SetupExitCode -ne 1641)) {
                ExitOnError -ExitErrorCode 69006 -ErrorLogDetailedMessage "Editor Setup exited with the code $SetupExitCode" -WriteToLog $true
            } Else {
                WriteToLog -message "Flux Core was installed successfully" -task $pendingtask -severity "info"
            }

<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>
[02-26-2021 13:20:45.723] [Installation] [Execute-Process] :: Working Directory is [D:\2_Git_Repository\SCCM_Ansys\Flux_new_Template_test\Files].
[02-26-2021 13:20:45.735] [Installation] [Execute-Process] :: Executing [D:\2_Git_Repository\SCCM_Ansys\Flux_new_Template_test\Files\hwFlux2020.1_win64.exe -i silent -DUSER_INS
TALL_DIR=C:\Altair\2020 -DACCEPT_EULA=YES]…
[02-26-2021 13:20:45.798] [Installation] [Execute-Process] :: Function failed, setting exit code to [60002]. *
Error Record:
-------------At D:\2_Git_Repository\SCCM_Ansys\Flux_new_Template_test\AppDeployToolkit\AppDeployToolkitMain.ps1:3168 char:5
+ $null = $process.Start()
*+ ~~~~~~~~~~~~~~~~~~~~~~~~

Error Inner Exception(s):
-------------------------
[02-26-2021 13:20:45.819] [Installation] [Close-InstallationProgress] :: Closing the installation progress dialog.
[02-26-2021 13:20:45.834] [Installation] [Close-InstallationProgress] :: Closing the installation progress dialog’s runspace.
[02-26-2021 13:20:45.897] [Installation] [Exit-Script] :: Altair_Flux_2020.1_EN_x64_R01 Installation completed with exit code [60002].
[02-26-2021 13:20:45.923] [Installation] [Test-PowerPoint] :: Check if PowerPoint is in either fullscreen slideshow mode or presentation mode…
[02-26-2021 13:20:45.945] [Installation] [Test-PowerPoint] :: PowerPoint application is not running.
[02-26-2021 13:20:45.967] [Installation] [Test-PowerPoint] :: PowerPoint is running in fullscreen mode [False].
[02-26-2021 13:20:46.029] [Installation] [Show-BalloonTip] :: Display balloon tip notification asynchronously with message [Installation failed.].
[02-26-2021 13:20:46.049] [Installation] [Execute-Process] :: [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe] is a valid fully qualified path, continue.
[02-26-2021 13:20:46.062] [Installation] [Execute-Process] :: Working Directory is [C:\Windows\System32\WindowsPowerShell\v1.0].
[02-26-2021 13:20:46.079] [Installation] [Execute-Process] :: Executing [C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe [PowerShell ScriptBlock]]…
[02-26-2021 13:20:46.102] [Installation] [Execute-Process] :: NoWait parameter specified. Continuing without waiting for exit code…
[02-26-2021 13:20:46.117] [Installation] [Exit-Script] :: -------------------------------------------------------------------------------

StdOut ExitCode StdErr
------ -------- ------

  •      60002*

That shouldnt happen. Will need to test this.

BTW, -ContinueOnError no longer ignores exit codes. Use -IgnoreExitCodes or -ExitOnProcessFailure

1 Like