Suppress folder at post-UnInstallation (AppDeployToolkitBanner.png error)

Hello
When i test my code, with powershell_ise admin [Elevated], I have this result. Deleting folder [C:\Users\Adminaccount\AppData\Local\Temp\24h\BlockExecution] recursively…

[07-12-2023 11:06:54.726] [Post-Uninstallation] [Remove-Folder] :: Failed to delete folder(s) and file(s) from path [C:\Users\Adminaccount\AppData\Local\Temp\24h\BlockExecution]. 
Error Record:
-------------

Message        : Impossible de supprimer l'élément C:\Users\Adminaccount\AppData\Local\Temp\24h\BlockExecution\AppDeployToolkitBanner.png: Le processus ne peut pas accéder au fichier 
                 'AppDeployToolkitBanner.png', car il est en cours d'utilisation par un autre processus. Impossible de supprimer l'élément C:\Users\Adminaccount\AppData\Local\Temp\24h\BlockExecution: Le 
                 répertoire n’est pas vide.
                 
InnerException : 

FullyQualifiedErrorId : Impossible de supprimer l'élément C:\Users\Adminaccount\AppData\Local\Temp\24h\BlockExecution\AppDeployToolkitBanner.png: Le processus ne peut pas accéder au fichier 
                        'AppDeployToolkitBanner.png', car il est en cours d'utilisation par un autre processus. Impossible de supprimer l'élément C:\Users\Adminaccount\AppData\Local\Temp\24h\BlockExecution
                        : Le répertoire n’est pas vide.
                        
ScriptStackTrace      : à Remove-Folder<Process>, C:\MyPackages\TGB_THEGREENBOW_7.4_MUI_001\Package\AppDeployToolkit\AppDeployToolkitMain.ps1 : ligne 4975
                        à Unblock-AppExecution<Process>, C:\MyPackages\TGB_THEGREENBOW_7.4_MUI_001\Package\AppDeployToolkit\AppDeployToolkitMain.ps1 : ligne 8308
                        à <ScriptBlock>, C:\MyPackages\TGB_THEGREENBOW_7.4_MUI_001\Package\Deploy-Application.ps1 : ligne 556

PositionMessage : Au caractère C:\MyPackages\TGB_THEGREENBOW_7.4_MUI_001\Package\AppDeployToolkit\AppDeployToolkitMain.ps1:4975 : 21
                  +                     Throw $ErrorRemoveFolder
                  +                     ~~~~~~~~~~~~~~~~~~~~~~~~

And the folder use is C:\Users\Useraccount\AppData\Local\Temp\24h\BlockExecution
Do you have any idea ?
thanks in advance.
Fred

[MOD: Fixed formatting with ``` before and after error message]

The is the ‘unable to remove AppDeployToolkitBanner.png during uninstall’ issue.
It is supposed to be fixed in V3.9.3

What version are you using?

I use V3.9.3.
The remove folder is after the post-install, and after the post-uninstallation.
The pb is the count user in powershell_ise and the right access.

Lets try something.

  1. Edit \AppDeployToolkit\AppDeployToolkitMain.ps1
  2. Search for $appDeployLogoBannerObject.Dispose($true)
  3. Replace with $appDeployLogoBannerObject.Dispose()

If this works, I’ll report it as a bug.
If not, report back anyhow.

That’s good.
Think you.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.