Unable to delete the contents of "C:\Users\Your_User_Account\AppData\Local\Temp\~BootWiz". When trying to delete one of the folders under "~BootWiz", a message was received about no having administrator rights to proceed with the deletion. When looking at the content of those folders, the error received is:
"You don't currently have permission to access this folder"
Even when logged in as the AppID account (in this case, as an example, we'll call it "svc_symantec"), and this "svc_symantec" user was part of the Administrators group on the SMP server.
When we looked at the "C:\Users\svc_symantec\AppData\Local\Temp" folder, we can see that "svc_symantec" user Full Control, however, when we looked at the actual files under any of the folders for "~BootWiz", this account was not present and didn't have rights.
Running ProcMon from Microsoft, we could see the following every time that we tried to delete the contents of any of these folders the following errors:
High Resolution Date & Time: 24/08/2020 14:17:10,4268593
Event Class: File System
Operation: CreateFile
Result: ACCESS DENIED
Path: C:\Users\svc_symantec\AppData\Local\Temp\~bootwiz\00004ba4\image\Windows\System32\streamci.dll
TID: 340
Duration: 0.0000525
Desired Access: Read Attributes, Delete, Read Control, Synchronize
Disposition: Open
Options: Synchronous IO Non-Alert, Open Reparse Point
Attributes: n/a
ShareMode: Read, Write, Delete
AllocationSize: n/a
High Resolution Date & Time: 24/08/2020 14:17:58,1084738
Event Class: File System
Operation: CreateFile
Result: ACCESS DENIED
Path: C:\Users\svc_symantec\AppData\Local\Temp\~bootwiz\00004ba4
TID: 10340
Duration: 0.0000444
Desired Access: Synchronize
Disposition: Open
Options:
Attributes: n/a
ShareMode: Read, Write, Delete
AllocationSize: n/a
Deployment Solution 8.5 RU3
ITMS 8.5 RU3
The problem appears when our processes try to delete temporary files/folder under User's temporary folder, the account used doesn't have enough rights to do it. BootWiz uses the Temp directory to create/extract the necessary files needed for Deployment Solution, then we just delete the created temporary folder.
However, it looks that something does not allow to delete, keeping the BootWiz files under the User's temporary folder.
Based on what we were able to troubleshoot, this issue is not with our product but with how Windows is propagating the necessary rights for the "svc_symantec" account in order to delete any of the files under this "C:\Users\svc_symantec\AppData\Local\Temp\~bootwiz" directory.
Find out if there is another process (like anti-virus, real-time scanner, etc) that could be preventing for deleting the temporary files or if you need to grant more permissions to the Account that you are using to install/upgrade.
In order to verify what could be causing the "Access Denied" (it seems that something does not allow to delete files exactly when our code tries to do it), try the following: