Scripts fail due to file named PSAppDeployToolkit in folder C:\Users\Public\

Scripts fail due to file named PSAppDeployToolkit in folder C:\Users\Public\

Somehow a file named PSAppDeployToolkit was created instead of a folder in C:\Users\Public, believe this has something todo with -BlockExecution. Version I used when this occurred was 3.6.2, with the function get-runningprocess from 3.6.3.

To solve this I made the following addition to the deploy-application.ps1 file
If ($deploymentType -ine ‘Uninstall’) {
[string]$installPhase = ‘Pre-Installation’

<My code starts here
If (!(Test-Path -Path “C:\Users\Public\PSAppDeployToolkit” -PathType Container))
Remove-Item “C:\Users\Public\PSAppDeployToolkit”
ends here>

Error message is below!

[Pre-Installation] :: Error Record:

Message : Could not find a part of the path ‘C:\Users\Public\PSAppDeploy
InnerException :

FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.OutFileCo
ScriptStackTrace : at Block-AppExecution<Process>, C:\WINDOWS\ccmcache\9n
AppDeployToolkit\AppDeployToolkitMain.ps1: line 4421
at Show-InstallationWelcome<Process>, C:\WINDOWS\ccmcac
he\9n\AppDeployToolkit\AppDeployToolkitMain.ps1: line 5
at <ScriptBlock>, C:\WINDOWS\ccmcache\9n\Deploy-Applica
tion.ps1: line 110
at <ScriptBlock>, <No file>: line 1
at <ScriptBlock>, <No file>: line 1

PositionMessage : At C:\WINDOWS\ccmcache\9n\AppDeployToolkit\AppDeployToolkitMa
in.ps1:4421 char:26
+ $debuggerBlockScript | Out-File -FilePath "$dirAppD
eployTemp\AppDeployToolkit_ …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This issue was fixed in the 3.6.3 release. Upgrade to the full release for the fix. The file is a remnant from a really old version of the toolkit.

1 Like

OK, good!

Can you please tell me which version is causing this! We have several packages with older version, I guess I need to update these to be sure that these errors doesn’t come back on other clients.

And how do I go about doing that? What parts of the toolkit is needed to replace?

Thx in advance!