WindowsAppsUnfukker icon indicating copy to clipboard operation
WindowsAppsUnfukker copied to clipboard

Permission error pesists after running the script.

Open a1d4r opened this issue 1 year ago • 2 comments

Once upon a time I messed up permissions on WindowsApps folder. I managed to fix some of the issues. In particular, Microsoft Work and default Windows Apps work as expected.

My problem is some of the apps don't run even after executing the script. These included Microsoft apps: MicrosoftWindows.CrossDevice, WSL2 as well as 3rd party applications such as TranslucentTB.

Here is the output of the script:

Welcome to the amazing WindowsApps Unfukker! Please sit tight!!

Fixing WindowsApps permissions...
Backup of existing permissions...
Successfully processed 0 files; Failed processing 0 files
Saved to C:\Program Files\WindowsApps_20240505_174640.txt

Fixing WindowsApps subfolders inheritance...
Successfully processed 304 files; Failed processing 0 files

Fixing WindowsApps subfolders permissions...

Fixing AppData Packages permissions, this could take a couple minutes...
Backup of existing permissions...
Successfully processed 0 files; Failed processing 2 files
Saved to C:\Users\Aidar\AppData\Local\Packages_20240505_174653.txt
C:\Users\Aidar\AppData\Local\Packages: The handle is invalid.
C:\Users\Aidar\AppData\Local\Packages\*: Access is denied.
Successfully processed 0 files; Failed processing 2 files
C:\Users\Aidar\AppData\Local\Packages: The handle is invalid.
Successfully processed 0 files; Failed processing 1 files
Fixing ProgramData Packages permissions...
Backup of existing permissions...
Successfully processed 0 files; Failed processing 0 files
Saved to C:\ProgramData\Packages_20240505_174653.txt
Successfully processed 1 files; Failed processing 0 files
Successfully processed 247 files; Failed processing 0 files
Successfully processed 247 files; Failed processing 0 files
Successfully processed 247 files; Failed processing 0 files

Unfukking finished!! (hopefully)

I wonder if these lines indicate some problems with my system:

C:\Users\Aidar\AppData\Local\Packages: The handle is invalid.
C:\Users\Aidar\AppData\Local\Packages\*: Access is denied.
Successfully processed 0 files; Failed processing 2 files
C:\Users\Aidar\AppData\Local\Packages: The handle is invalid.
Successfully processed 0 files; Failed processing 1 files

How can I check what gone wrong? I'm tired of getting these error windows on Windows startup. And I want to use WSL2. I tried to reinstalled it multiple times, but after the first run it gets broken. It is making me mad how Microsoft managed to create such piece of garbage.

I would be very grateful if someone guide me the direction to search. I tried almost everything I could find on the internet but still no success.

error_permission error_permission_2

a1d4r avatar May 05 '24 15:05 a1d4r

It's hard to say just from those errors. ProcessMonitor would be needed to analyze what paths it's attempting to access. It may also involve the AppRepository folder permissions, which I haven't cracked yet.

AgentRev avatar May 12 '24 15:05 AgentRev

Same here. I have been battling this problem for months. Ran the script and the output was similar to the OP's. Same error messages when trying to run WSL 2 or Phone Link. Before I could run apps by going into the folder and running the .exe like TradingView for instance. However, never been able to run WSL2. Now, after running the script none of the apps run anymore and I cannot go into the folder without giving myself permissions again. I changed the perms to everyone on C:\Users\Aidar\AppData\Local\Packages\ and then the script completed successfully with any failed files but apps are still inaccessible.

astraetech avatar Mar 01 '25 07:03 astraetech

I'm having the same sort of output—everything runs dandy except the %LOCALAPPDATA% bit. I get the same "The handle is invalid" and "Access is denied" errors. The errors stopped happening after I ran the following command:

icacls "%LOCALAPPDATA%\Packages" /inheritance:e /t

NVIDIA Control Panel won't start still, but I don't get the permission error when trying to start it, now.

r2b2grady avatar Aug 01 '25 00:08 r2b2grady