-BlockExecution not releasing after install completes

We have packaged PowerBI using the -BlockExecution switch but when the install finished the block does not release and the install fails. Most recently it shows an error code -1073741819. Is there anything I can do to identify why this is failing this way?

This is a PowerBI install error number. so… powerbi install error 1073741819 at DuckDuckGo

Notice I don’t make the error number negative. If you have the minus sign, it EXCLUDES all hits with the number 1073741819. (Exactly what you don’t want)

If it wasn’t a PowerBI install error, PSADT always creates a log file.

Unfortunately PowerBI Desktop Install completes. When user tries to launch it they get an error that the process block is still in place. So while I appreciate that in a straight install the error would be application related in this case it is the unblock process that is failing.

The log file shows the following:
[Installation] :: Execution completed successfully with exit code [0].
[Installation] :: Refresh the Desktop and the Windows Explorer environment process block.
and then the package fails.

Any other ideas?
Thank you

wait a minute:

  1. PSADT launches an MSI
  2. MSI ends with exitcode 0
  3. and PSADT still returns exitcode -1073741819 ?!?

What is PSADT trying to do after installing that MSI?

It appears to be removing some process block. Beyond that I cannot tell.

smells like the clean-up for -BlockExecution thing that you are having problems with.

Please post that part of the log file all the way to where it spits out -1073741819
Remove/replace the sensitive bits as you see fit.

also, what version of PSADT are you using?

The log does not show the 1073741819 error. The log just ends with that:
[Installation] :: Execution completed successfully with exit code [0].
[Installation] :: Refresh the Desktop and the Windows Explorer environment process block.
and the eventually the process times out

I now have another instance with a different application not using -blockexecution where the same thing is happening
We are using PSADT 3.8.4 and the latest occurrence happened on an older package using PSADT 3.6.9.

Is it possible that the folder structure for the block execution is lingering when it should be deleted?

Here is the Pre-Install and Install portion of the PSADT log:

]LOG]!><time=“14:41:35.285-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The following users are logged on to the system: [Domain\account].]LOG]!><time=“14:41:35.291-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Current process is running with user account [NT AUTHORITY\SYSTEM] under logged in user session for [Domain\account].]LOG]!><time=“14:41:35.298-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The following user is the console user [Domain\account] (user with control of physical monitor, keyboard, and mouse).]LOG]!><time=“14:41:35.306-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The active logged on user is [Domain\account].]LOG]!><time=“14:41:35.315-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The active logged on user [Domain\account] has a primary UI language of [EN].]LOG]!><time=“14:41:35.321-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The following UI messages were imported from the config XML file: [UI_Messages_EN].]LOG]!><time=“14:41:35.329-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The active logged on user [Domain\account] has a DPI scale factor of [100] with DPI pixels [96].]LOG]!><time=“14:41:35.336-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Unable to load COM Object [Microsoft.SMS.TSEnvironment]. Therefore, script is not currently running from a SCCM Task Sequence.]LOG]!><time=“14:41:35.347-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [Schedule] exists.]LOG]!><time=“14:41:35.580-240” date=“04-29-2022” component=“Test-ServiceExists” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service [Schedule] startup mode.]LOG]!><time=“14:41:35.603-240” date=“04-29-2022” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [Schedule] startup mode is set to [Automatic].]LOG]!><time=“14:41:35.786-240” date=“04-29-2022” component=“Get-ServiceStartMode” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Get the service object for service [Schedule].]LOG]!><time=“14:41:35.813-240” date=“04-29-2022” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Service [Schedule] with display name [Task Scheduler] has a status of [Running].]LOG]!><time=“14:41:35.832-240” date=“04-29-2022” component=“Start-ServiceAndDependencies” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: The task scheduler service is in a healthy state: True.]LOG]!><time=“14:41:35.841-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Session 0 detected, process running in user interactive mode, user(s) logged in.]LOG]!><time=“14:41:35.848-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Installation is running in [Interactive] mode.]LOG]!><time=“14:41:35.855-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Initialization] :: Deployment type is [Installation].]LOG]!><time=“14:41:35.861-240” date=“04-29-2022” component=“PSAppDeployToolkit” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“AppDeployToolkitMain.ps1”>
<![LOG[[Pre-Installation] :: Evaluate disk space requirements.]LOG]!><time=“14:41:35.888-240” date=“04-29-2022” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Retrieve free disk space for drive [C:].]LOG]!><time=“14:41:35.904-240” date=“04-29-2022” component=“Get-FreeDiskSpace” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Free disk space for drive [C:]: [45470 MB].]LOG]!><time=“14:41:35.932-240” date=“04-29-2022” component=“Get-FreeDiskSpace” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Successfully passed minimum disk space requirement check.]LOG]!><time=“14:41:35.959-240” date=“04-29-2022” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Get deferral history…]LOG]!><time=“14:41:35.975-240” date=“04-29-2022” component=“Get-DeferHistory” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Registry key [Registry::HKEY_LOCAL_MACHINE\SOFTWARE\PSAppDeployToolkit\DeferHistory\Kiteworks2.7.2201.2401] does not exist. Return $null.]LOG]!><time=“14:41:35.988-240” date=“04-29-2022” component=“Get-RegistryKey” context=“NT AUTHORITY\SYSTEM” type=“2” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User has [2] deferrals remaining.]LOG]!><time=“14:41:35.997-240” date=“04-29-2022” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Check for running applications: [outlook]]LOG]!><time=“14:41:36.040-240” date=“04-29-2022” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: The following processes are running: [OUTLOOK].]LOG]!><time=“14:41:36.139-240” date=“04-29-2022” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Prompt user to close application(s) [Microsoft Outlook]…]LOG]!><time=“14:41:36.188-240” date=“04-29-2022” component=“Show-WelcomePrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User has the option to defer.]LOG]!><time=“14:41:36.195-240” date=“04-29-2022” component=“Show-WelcomePrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: The running processes have changed. Updating the apps to close: [Microsoft Outlook]…]LOG]!><time=“14:41:38.289-240” date=“04-29-2022” component=“Show-WelcomePrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User selected to continue…]LOG]!><time=“14:43:00.296-240” date=“04-29-2022” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Check for running applications: [outlook]]LOG]!><time=“14:43:02.303-240” date=“04-29-2022” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: The following processes are running: [OUTLOOK].]LOG]!><time=“14:43:02.349-240” date=“04-29-2022” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Prompt user to close application(s) [Microsoft Outlook]…]LOG]!><time=“14:43:02.367-240” date=“04-29-2022” component=“Show-WelcomePrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User has the option to defer.]LOG]!><time=“14:43:02.373-240” date=“04-29-2022” component=“Show-WelcomePrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User selected to continue…]LOG]!><time=“14:43:35.654-240” date=“04-29-2022” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Check for running applications: [outlook]]LOG]!><time=“14:43:37.665-240” date=“04-29-2022” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Specified applications are not running.]LOG]!><time=“14:43:37.702-240” date=“04-29-2022” component=“Get-RunningProcesses” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User has the option to defer.]LOG]!><time=“14:43:37.713-240” date=“04-29-2022” component=“Show-WelcomePrompt” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: User selected to continue…]LOG]!><time=“14:43:49.456-240” date=“04-29-2022” component=“Show-InstallationWelcome” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Check if PowerPoint is in either fullscreen slideshow mode or presentation mode…]LOG]!><time=“14:43:51.501-240” date=“04-29-2022” component=“Test-PowerPoint” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: PowerPoint application is not running.]LOG]!><time=“14:43:51.524-240” date=“04-29-2022” component=“Test-PowerPoint” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: PowerPoint is running in fullscreen mode [False].]LOG]!><time=“14:43:51.531-240” date=“04-29-2022” component=“Test-PowerPoint” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Bypassing Show-BalloonTip [Mode:Interactive, Config Show Balloon Notifications:False, Presentation Detected:False]. BalloonTipText:Installation Started.]LOG]!><time=“14:43:51.540-240” date=“04-29-2022” component=“Show-BalloonTip” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Pre-Installation] :: Spin up progress dialog in a separate thread with message: [Kiteworks installation\upgrade is in progress. The installation may take up to 20 minutes to complete. During this time you will not be able to launch the application.].]LOG]!><time=“14:43:51.604-240” date=“04-29-2022” component=“Show-InstallationProgress” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Read data from Windows Installer database file [C:\WINDOWS\ccmcache\9b\Files\plugin_outlook_2.7.2201.2401.msi] in table [Property].]LOG]!><time=“14:43:52.659-240” date=“04-29-2022” component=“Get-MsiTableProperty” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Get information for installed Product Code [{927F8C66-4B46-4D65-9691-2F20728DF299}]…]LOG]!><time=“14:43:52.805-240” date=“04-29-2022” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Skipped 330 entries while searching, because they were considered Microsoft updates.]LOG]!><time=“14:43:53.632-240” date=“04-29-2022” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Found no application based on the supplied parameters.]LOG]!><time=“14:43:53.639-240” date=“04-29-2022” component=“Get-InstalledApplication” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Executing MSI action [Install]…]LOG]!><time=“14:43:53.649-240” date=“04-29-2022” component=“Execute-MSI” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: [C:\WINDOWS\System32\msiexec.exe] is a valid fully qualified path, continue.]LOG]!><time=“14:43:53.734-240” date=“04-29-2022” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Check to see if mutex [Global_MSIExecute] is available. Wait up to [10 minute(s)] for the mutex to become available.]LOG]!><time=“14:43:53.752-240” date=“04-29-2022” component=“Test-IsMutexAvailable” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Mutex [Global_MSIExecute] is available for an exclusive lock.]LOG]!><time=“14:43:53.767-240” date=“04-29-2022” component=“Test-IsMutexAvailable” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Working Directory is [C:\WINDOWS\ccmcache\9b\Files].]LOG]!><time=“14:43:54.819-240” date=“04-29-2022” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Executing [C:\WINDOWS\System32\msiexec.exe /i “C:\WINDOWS\ccmcache\9b\Files\plugin_outlook_2.7.2201.2401.msi” /norestart /qn /lv “C:\Support\logs\applogs\Kiteworks_2.7.2201.2401.log” /Lv “C:\Support\Logs\Applogs\plugin_outlook_2.7.2201.2401_Install.log”]…]LOG]!><time=“14:43:54.828-240” date=“04-29-2022” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Execution completed successfully with exit code [0].]LOG]!><time=“14:44:09.497-240” date=“04-29-2022” component=“Execute-Process” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>
<![LOG[[Installation] :: Refresh the Desktop and the Windows Explorer environment process block.]LOG]!><time=“14:44:09.506-240” date=“04-29-2022” component=“Update-Desktop” context=“NT AUTHORITY\SYSTEM” type=“1” thread=“28748” file=“Deploy-Kiteworks-2.7.2201.2401-R1B1.ps1”>

FYI: When you post code or log files please use the <\> tool. I had a wicked time figuring out what you posted.
I was hoping to see what PSADT was trying to do AFTER it installed the MSI and what happened when it tried to clean up the -BlockExecution.

BTW: -BlockExecution and ‘Windows Explorer environment process block’ are 2 unrelated things.

I personally don’t use -BlockExecution because of the hole you fell in. Years ago I used -BlockExecution on a VLC package on my physical workstation. It took me 3+ months of no VLC to hunker down and chase the problem. The -BlockExecution feature creates a special trigger called an Event that runs some code and STAYS ACTIVE AFTER THE PSADT SCRIPT ENDS. It even survives reboots! Back then, if the PSADT script failed, there was no attempt to cleanup of the -BlockExecution Event. The newer versions somewhat fixed this cleanup issue. Maybe for you, the cleanup failed one time and here you are.

I can probably figure out a way for you to remove the -BlockExecution for your PC but only next week.

Thank you and sorry about that, first time I am posting here.
I will actually take a look at the Events to see if that is still lingering in Scheduled Tasks. Your comment about the difference between the -BlockExecution and Windows environment process block helps. I did not realize they are being treated differently and thought they were based on the same trigger. Let me do a little digging in the failures and see what I can find
Thank you

The more I look into this it looks like the Update-Desktop is not processing, and may be blocked from refreshing the desktop and removing the process block.

The unblocking happens when PSADT gracefully exits the script using Exit-Script

## If block execution variable is true, call the function to unblock execution
If ($BlockExecution) { Unblock-AppExecution }

The Unblock-AppExecution function is called by the Exit-Script function .
If also mentions you could unblock using the -CleanupBlockedApps switch on Deploy-Application.ps1 as described in the partial listing of the Unblock-AppExecution function below:

Function Unblock-AppExecution {
<#
.SYNOPSIS
	Unblocks the execution of applications performed by the Block-AppExecution function
.DESCRIPTION
	This function is called by the Exit-Script function or when the script itself is called with the parameters -CleanupBlockedApps

I actually just found a similar reference from someone having the same issue with 3.8.1 back in 2020, but no response. (Refresh-Desktop is not refreshing the global environment block · Issue #37 · PSAppDeployToolkit/PSAppDeployToolkit · GitHub)

The update-desktop function is not running at the end of the Execute-MSI process. I checked the even log and when the application is failing, Powershell is getting an Application Error code 0xC0000005.

Not sure where I need to go next. but it’s not the PSADT, since we’ve been using the same code for years

Got a little bit farther, still doesn’t make sense though. The Update-Desktop portion of the script is failing now with an exit code 255. I’ve updated the Config.xml to point to C:\Temp rather than $envTemp . I made sure to remove all instances of the Temp\PSAPPDEPLOYToolkit folders and don’t see them being re-created. I am stumped here as I can run the Powershell manually from the network directory and it successfully installs, but when run under the system context it fails.

Error code 0xC0000005 ===> 5 = Access denied

I’m starting to think some of the ACLs on you test PC are corrupt.
I don’t think I can help much more.