IDK, that is what the error says, 'access denied'. If you are not an admin user, I think windows has a way to 'Run as admin' I think. If not google should have an answer for how to do the equivalent of sudo on windows.
@pieterh1954. For my UNO R4 WiFi I simply installed the "Arduino UNO R4 Boards" core using the Boards Manager. Selected the UNO R4 from Tools in the IDE and it just worked.
I am on Windows 10 and had no access denied problems.
Note: I had to update the firmware using the "Firmware Updater" in tools. (Make sure the plotter and Monitor is closed when doing the update.)
It's the same file-path both times. The IDE is trying to open it "for writing", but is being "denied". This of course "should not happen" if that user is you. Looks like staging is where the .zip file is to be downloaded, and then unzipped from there.
(Note that AppData in your $HOME directory is hidden, so if you want to see it in File Explorer, you need to enable the Show Hidden Files option.)
If the suggestion to install via the Boards Manager does not work, try this
Right-click the Start button
Choose Windows PowerShell (not the (Admin) one, the normal one). That should drop you here
PS C:\Users\pccjh>
Go to your user cache directory, which on Windows is in the environment's %LocalAppData% variable (tab completion can help)
PS C:\Users\pccjh> cd $env:LOCALAPPDATA
PS C:\Users\pccjh\AppData\Local>
See what is in that directory with dir or ls. You should see at least
Microsoft
Programs
Arduino15
How far do you get?
PS C:\Users\pccjh\AppData\Local> cd Arduino15
PS C:\Users\pccjh\AppData\Local\Arduino15> cd staging
PS C:\Users\pccjh\AppData\Local\Arduino15\staging> cd packages
PS C:\Users\pccjh\AppData\Local\Arduino15\staging\packages>
All the way? Look around again with dir. I have like 1 gig worth of .zip and other compressed archives. (When do these get cleaned up?) Are there other files there?