Error 0xEA62(60002)

I’ve done a deployment and I’ve installed on “Local” without problems.
Then I have published the deployment from SCCM and when I try to do the installation from Software Centre I received this error 0xEA62(60002).

This is the deployment that Works executing deploy-application.exe directly on one computer.

[CmdletBinding()]
Param (
	[Parameter(Mandatory=$false)]
	[ValidateSet('Install','Uninstall')]
	[string]$DeploymentType = 'Install',
	[Parameter(Mandatory=$false)]
	[ValidateSet('Interactive','Silent','NonInteractive')]
	[string]$DeployMode = 'Interactive',
	[Parameter(Mandatory=$false)]
	[switch]$AllowRebootPassThru = $false,
	[Parameter(Mandatory=$false)]
	[switch]$TerminalServerMode = $false,
	[Parameter(Mandatory=$false)]
	[switch]$DisableLogging = $false
)

Try {
	## Set the script execution policy for this process
	Try { Set-ExecutionPolicy -ExecutionPolicy 'ByPass' -Scope 'Process' -Force -ErrorAction 'Stop' } Catch {}
	
	##*===============================================
	##* VARIABLE DECLARATION
	##*===============================================
	## Variables: Application
	[string]$appVendor = 'Microsoft'
	[string]$appName = 'Dynamics CRM'
	[string]$appVersion = ''
	[string]$appArch = ''
	[string]$appLang = 'ES'
	[string]$appRevision = '01'
	[string]$appScriptVersion = '1.0.0'
	[string]$appScriptDate = '02/12/2017'
	[string]$appScriptAuthor = 'Haide Pulido'
	[string]$appCloseApps = 'iexplore,outlook'
	
	##*===============================================
	## Variables: Install Titles (Only set here to override defaults set by the toolkit)
	[string]$installName = ''
	[string]$installTitle = ''
	
	##* Do not modify section below
	#region DoNotModify
	
	## Variables: Exit Code
	[int32]$mainExitCode = 0
	
	## Variables: Script
	[string]$deployAppScriptFriendlyName = 'Deploy Application'
	[version]$deployAppScriptVersion = [version]'3.7.0'
	[string]$deployAppScriptDate = '02/13/2018'
	[hashtable]$deployAppScriptParameters = $psBoundParameters
	
	## Variables: Environment
	If (Test-Path -LiteralPath 'variable:HostInvocation') { $InvocationInfo = $HostInvocation } Else { $InvocationInfo = $MyInvocation }
	[string]$scriptDirectory = Split-Path -Path $InvocationInfo.MyCommand.Definition -Parent
	
	## Dot source the required App Deploy Toolkit Functions
	Try {
		[string]$moduleAppDeployToolkitMain = "$scriptDirectory\AppDeployToolkit\AppDeployToolkitMain.ps1"
		If (-not (Test-Path -LiteralPath $moduleAppDeployToolkitMain -PathType 'Leaf')) { Throw "Module does not exist at the specified location [$moduleAppDeployToolkitMain]." }
		If ($DisableLogging) { . $moduleAppDeployToolkitMain -DisableLogging } Else { . $moduleAppDeployToolkitMain }
	}
	Catch {
		If ($mainExitCode -eq 0){ [int32]$mainExitCode = 60008 }
		Write-Error -Message "Module [$moduleAppDeployToolkitMain] failed to load: `n$($_.Exception.Message)`n `n$($_.InvocationInfo.PositionMessage)" -ErrorAction 'Continue'
		## Exit the script, returning the exit code to SCCM
		If (Test-Path -LiteralPath 'variable:HostInvocation') { $script:ExitCode = $mainExitCode; Exit } Else { Exit $mainExitCode }
	}
	
	#endregion
	##* Do not modify section above
	##*===============================================
	##* END VARIABLE DECLARATION
	##*===============================================
		
	If ($deploymentType -ine 'Uninstall') {
		##*===============================================
		##* PRE-INSTALLATION
		##*===============================================
		[string]$installPhase = 'Pre-Installation'

		## Show Welcome Message, close Internet Explorer if required, allow up to 3 deferrals, verify there is enough disk space to complete the install, and persist the prompt
		Show-InstallationWelcome -CloseApps $appCloseApps -CheckDiskSpace -PersistPrompt
		
		## Show Progress Message (with the default message)
		Show-InstallationProgress
		
		## <Perform Pre-Installation tasks here>
		
		
		##*===============================================
		##* INSTALLATION 
		##*===============================================
		[string]$installPhase = 'Installation'
		
		## Handle Zero-Config MSI Installations
		If ($useDefaultMsi) {
			[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Install'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
			Execute-MSI @ExecuteDefaultMSISplat; If ($defaultMspFiles) { $defaultMspFiles | ForEach-Object { Execute-MSI -Action 'Patch' -Path $_ } }
		}
		
		## <Perform Installation tasks here>

		Execute-Process -path 'CRM2016-Client-ESN-i386.exe' -parameters '/quiet /extract:c:\Temp\CRMforOutlook'
		Execute-Process -path 'c:\Temp\CRMforOutlook\SetupClient.exe' -parameters '/Q /installofflinecapability'
		
		Copy-File -Path "$dirSupportFiles\config.xml" -destination "C:\Program Files (x86)\Microsoft Dynamics CRM\" -recurse

		Execute-Process -path 'C:\Program Files (x86)\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe' -parameters '/Q /i "C:\Program Files (x86)\Microsoft Dynamics CRM\config.xml"'
		
		
		##*===============================================
		##* POST-INSTALLATION
		##*===============================================
		[string]$installPhase = 'Post-Installation'
		
		## <Perform Post-Installation tasks here>
		
		## Display a message at the end of the install
		If (-not $useDefaultMsi) { Show-InstallationPrompt -Message 'You can customize text to appear at the end of an install or remove it completely for unattended installations.' -ButtonRightText 'OK' -Icon Information -NoWait }
	}
	ElseIf ($deploymentType -ieq 'Uninstall')
	{
		##*===============================================
		##* PRE-UNINSTALLATION
		##*===============================================
		[string]$installPhase = 'Pre-Uninstallation'
		
		## Show Welcome Message, close Internet Explorer with a 60 second countdown before automatically closing
		Show-InstallationWelcome -CloseApps 'iexplore' -CloseAppsCountdown 60
		
		## Show Progress Message (with the default message)
		Show-InstallationProgress
		
		## <Perform Pre-Uninstallation tasks here>
		
		
		##*===============================================
		##* UNINSTALLATION
		##*===============================================
		[string]$installPhase = 'Uninstallation'
		
		## Handle Zero-Config MSI Uninstallations
		If ($useDefaultMsi) {
			[hashtable]$ExecuteDefaultMSISplat =  @{ Action = 'Uninstall'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) }
			Execute-MSI @ExecuteDefaultMSISplat
		}
		
		# <Perform Uninstallation tasks here>
		
		
		##*===============================================
		##* POST-UNINSTALLATION
		##*===============================================
		[string]$installPhase = 'Post-Uninstallation'
		
		## <Perform Post-Uninstallation tasks here>
		
		
	}
	
	##*===============================================
	##* END SCRIPT BODY
	##*===============================================
	
	## Call the Exit-Script function to perform final cleanup operations
	Exit-Script -ExitCode $mainExitCode
}
Catch {
	[int32]$mainExitCode = 60001
	[string]$mainErrorMessage = "$(Resolve-Error)"
	Write-Log -Message $mainErrorMessage -Severity 3 -Source $deployAppScriptFriendlyName
	Show-DialogBox -Text $mainErrorMessage -Icon 'Stop'
	Exit-Script -ExitCode $mainExitCode
}

When I try from Software Centre It seems that this step doesn’t work :

Execute-Process -path 'c:\Temp\CRMforOutlook\SetupClient.exe' -parameters '/Q /installofflinecapability'

Log:

<![LOG[[Installation] :: [CRM2016-Client-ESN-i386.exe] successfully resolved to fully qualified path [C:\Windows\ccmcache\k\Files\CRM2016-Client-ESN-i386.exe].]LOG]!><time="16:25:33.99960" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Working Directory is [C:\Windows\ccmcache\k\Files].]LOG]!><time="16:25:34.26860" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Executing [C:\Windows\ccmcache\k\Files\CRM2016-Client-ESN-i386.exe /quiet /extract:c:\Temp\CRMforOutlook]...]LOG]!><time="16:25:34.32260" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="16:27:58.79760" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: [c:\Temp\CRMforOutlook\SetupClient.exe] is a valid fully qualified path, continue.]LOG]!><time="16:27:58.82260" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Working Directory is [c:\Temp\CRMforOutlook].]LOG]!><time="16:27:58.84460" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Executing [c:\Temp\CRMforOutlook\SetupClient.exe /Q /installofflinecapability ...]LOG]!><time="16:27:58.86960" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Execution completed successfully with exit code [0].]LOG]!><time="16:28:24.14960" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Destination folder does not exist, creating destination folder [C:\Program Files (x86)\Microsoft Dynamics CRM\].]LOG]!><time="16:28:24.19060" date="12-18-2018" component="Copy-File" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Copy file(s) recursively in path [C:\Windows\ccmcache\k\SupportFiles\config.xml] to destination [C:\Program Files (x86)\Microsoft Dynamics CRM\].]LOG]!><time="16:28:24.22260" date="12-18-2018" component="Copy-File" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: File copy completed successfully.]LOG]!><time="16:28:24.26260" date="12-18-2018" component="Copy-File" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: [C:\Program Files (x86)\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe] is a valid fully qualified path, continue.]LOG]!><time="16:28:24.28760" date="12-18-2018" component="Execute-Process" context="NT AUTHORITY\SYSTEM" type="1" thread="6240" file="Deploy-Application.ps1">
<![LOG[[Installation] :: Function failed, setting exit code to [60002]. 
Error Record:
-------------

What it looks like to me is that the script is continuing on before the SetupClient.exe is finished. If you notice in the log, that finishes with an Exit code of 0, so it looks like that is running and finishing. But the copy-file can’t find the destination directory and the script can’t find the Microsoft.Crm.Application.Outlook.ConfigWizard.exe…

Are you running this on a 64-bit PC?

Yes, It is on a 64b pc

It is failing to evaluate the xml file in the parameter section. Add back ticks so that it will evaluate it separately.


Execute-Process -path 'C:\Program Files (x86)\Microsoft Dynamics CRM\Client\ConfigWizard\Microsoft.Crm.Application.Outlook.ConfigWizard.exe' -parameters "/Q /i `"C:\Program Files (x86)\Microsoft Dynamics CRM\config.xml`""

1 Like

Do you think so? As I said the toolkit deployment works If I copy and execute locally. The problem comes when I publish the toolkit deployment on Software Centre ( SCCM).

This part works, I can see uncompress files on c:\temp :
Execute-Process -path ‘CRM2016-Client-ESN-i386.exe’ -parameters ‘/quiet /extract:c:\Temp\CRMforOutlook’

**But that one I don’t think so because the installation Folder is empty: **
Execute-Process -path ‘c:\Temp\CRMforOutlook\SetupClient.exe’ -parameters '/Q /installofflinecapability’

When I go to “C:\Program Files (x86)\Microsoft Dynamics CRM” only there is the file that I copy in this step:

Copy-File -Path “$dirSupportFiles\config.xml” -destination “C:\Program Files (x86)\Microsoft Dynamics CRM” -recurse

That’s why I think Step in bolding is the step that that is failing.

I see what your talking about in the log now. Maybe try a wait or sleep command after the SetupClient.exe for a minute or two and see if the setup needs more time to complete as Jim stated in the above comments.

I tried sleep about 5 minutes and doesn’t work.
I have found a difference between “Local” installation and installation through Sccm.
Local installation is using current user account and It works
Sccm installation is using NT AUTHORITY\SYSTEM account and it doesn’t work.
Any idea? Could be this the problem?

Hi

Download PsExec.exe from Microsoft site "https://docs.microsoft.com/en-us/sysinternals/downloads/psexec"
and run your PSDT script through this exe. PsExec help to run installation in system context same as SCCM does. To perform this , go to windows -> open CMD as “Run as Administrator” and the browse the path till psexec.exe and type command psexec.exe -i -s cmd
This will open the system context command prompt on which you can execute your script. If the setup failing to execute from SCCM then it should fail from PsExec also. Please try.

I am also getting the same error, for the code.

[Post-Installation] :: Executing [C:\WINDOWS\ccmcache\372\Files\regedit.exe /S “C:\WINDOWS\ccmcache\372\Files\AIM.reg”]

[Post-Installation] :: Function failed, setting exit code to [60002].
Error Record:

Message : Exception calling “Start” with “0” argument(s): “The
specified executable is not a valid application for this OS
platform.”
InnerException : System.ComponentModel.Win32Exception (0x80004005): The
specified executable is not a valid application for this OS
platform.
at System.Diagnostics.Process.StartWithCreateProcess(Proces
sStartInfo startInfo)
at CallSite.Target(Closure , CallSite , Object )

FullyQualifiedErrorId : Win32Exception
ScriptStackTrace : at Execute-Process, C:\WINDOWS\ccmcache\372\Ap
pDeployToolkit\AppDeployToolkitMain.ps1: line 2706
at ,
C:\WINDOWS\ccmcache\372\Deploy-Application.ps1: line
222
at , : line 1
at , : line 1

PositionMessage : At C:\WINDOWS\ccmcache\372\AppDeployToolkit\AppDeployToolkitM
ain.ps1:2706 char:5
+ [boolean]$processStarted = $process.Start()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Error Inner Exception(s):

Message : The specified executable is not a valid application for this
OS platform.
InnerException :

==============================================

Note the AIM.reg is creating the entry in [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Witness Systems\AIM

I am getting the issue on Windows 7, but works on windwos 10 on both machine i am installing using SCCM.

Hello,

I don’t know if this issue has solved or not but here is the solution that you can try -

  1. If its only single registry key then you can use “Set-RegistryKey” function to create the registry hive
  2. If there are large number of keys then try command line -
    Execute-Process -FilePath “reg.exe” -Parameters “import $dirFiles\AIM.reg” -PassThru

(7 month necro, but maybe this will help someone else)

I think you’re asking the wrong questions, or at least asking them in the wrong order.

You need to troubleshoot the installer before you start troubleshooting PSADT. Leverage the logging switch that is provided in the installer. You could also try doing an administrative install to grab an MSI file that might behave better. You could also try specifying an install directory. You could even try running the SCCM deployment as x86 on the x64 client.

What PowerShell version is running on your Windows 7 machine?

60002 is an error specifically tied to Execute-Process and it means the function failed before it even started the process - usually due to incorrect input but sometimes just an internal error.