Giter Club home page Giter Club logo

windowsappsunfukker's People

Contributors

agentrev avatar e-t-l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windowsappsunfukker's Issues

Minor Issue - Rest everything works well!

First of all super thanks for making this awesome script! It works well!! after searching the internet and trying half working solutions, I came across your script, and it fixed my issue! Many thanks!

The script has an out of context "else" block at line 232 which fails its execution. I locally made the change, shifted the "else" block inside the previous "elseif", to be precise i placed it after line 228 (you know what i mean!). The script ran well after that and my system is back to normal!

Once again super thanks for this awesome fix and please fix this minor error in the script. Cheers!

Note: I had moved the else block in the said position as it appeared to be the right place, if not please do move it in the right position as per your logic flow!

Before:

image

After:

image

Confusion

Hello, I may not be the smartest in this category and do not get the instructions. I am trying to run C:\Program Files\WindowsApps\Microsoft.GamingApp_2404.1001.25.0_x64__8wekyb3d8bbwe\XboxPcApp.exe, or at least fix this, can you explain how to do it, thank you

script cannot run

when I run this script, prompts those information:

C:\Users\login\Downloads\PSTools>psexec.exe -s -i powershell -ExecutionPolicy Bypass -File "FULL_PATH_HERE\WindowsAppsUnfukker.ps1"

PsExec v2.43 - Execute processes remotely
Copyright (C) 2001-2023 Mark Russinovich
Sysinternals - www.sysinternals.com

powershell exited on AVALON with error code -196608.

How can I fix it?

powershell exited on AIMFLYING-PC with error code -196608.

I'm using the command, and it's just making that

 psexec.exe -s -i powershell -ExecutionPolicy Bypass -File WindowsAppsUnfukker.ps1

PsExec v2.34 - Execute processes remotely
Copyright (C) 2001-2021 Mark Russinovich
Sysinternals - www.sysinternals.com


powershell exited on AIMFLYING-PC with error code -196608.

I just fucked my WindowsApps folder

Error creating key file

Firstly I ran this script with a bat script
image

Then I ran the script in the way described
image

Unable to get the script to run

[Question] Why does "This app can't open Check the Windows Store..." appear after file modification?

Hi.
Thank you a lot, finally I found the answer to the question that has been bothering me for a long time.

Yet, there is another question appear. After some modifications to the application files, I am unable to run this application due to an error appearing with the following text "This app can't open Check the Windows Store for more info about XXX. See in Store". Even after returning the original file back this error doesn't disappear, only reinstallation helps.
Could you please give some advice on how to launch an app with modified files?

AppData Packages not found: Empty string from (Get-WMIObject Win32_ComputerSystem).UserName

I wanted to test the script in a VM first and if failed with the error below. From comments on the question here, I understand now that it is because I was on a remote desktop session, so it's not likely to be a common scenario.

If you iterate the user folders in C:\Users\ instead of using Win32_ComputerSystem.UserName, it will fix this as well as support the possibility of multiple windows users. Both edge cases, but a possible improvement.

Thanks for the script!

You cannot call a method on a null-valued expression.
At C:\Downloads\WindowsAppsUnfukker-main\WindowsAppsUnfukker.ps1:186 char:1
+ $Username = (Get-WMIObject Win32_ComputerSystem).UserName.Split('\')[ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull


WARNING: AppData Packages not found, please file a GitHub issue here:
https://github.com/AgentRev/WindowsAppsUnfukker/issues
Copy-paste this in the description: C:\Users\\AppData\Local\Packages

Permission error pesists after running the script.

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

WARNING: AppData Packages not found

Copy-paste this in the description: C:\Users\Alex\AppData\Local\Packages

I got this error that it was unable to find the AppData packages.
When I installed Windows it automatically named my user folder after the first 5 characters of my used email apparently (alexg). However I'd rather use a basic username and switched to local account instead. This however doesn't alter the name of the user folder that was made on installation and now I have a user folder that does not fit my username. I read if I could fix this but it could apparently break some stuff so I wasn't really that interested in doing so.

That aside, the program did work! I tried to make my Nvidia control panel work again by using the mentioned "-old renaming method". And clicking the program now results in a "The parameter is incorrect" error, instead of a permission error. So my nvidia drivers are probably just botched now, as I have the permission to open the broken program haha.

We need this awesome magic for XboxGames folder

The XboxGames folder has some kind of magic similar (but not the same to WindowsApps).
I'm a confident powershell scripter and windows admin for years.
I've tried modifying the script to do the same logic on the XboxGames folder without success.
(Folder and files are scaned, ACLs are applied, but they don't seem to be the same.)
The error about execution is pretty much the same as before fixing the WindowsApps folder, and they seem to use some similar stupid protection on the folder, where if you clone a disk, even if cloned sector by sector, it breaks).

powershell exited with error code -196608.

When running it doesn't work, I get this.

psexec.exe -s -i powershell -ExecutionPolicy Bypass -File "WindowsAppsUnfukker.ps1"

PsExec v2.4 - Execute processes remotely
Copyright (C) 2001-2022 Mark Russinovich
Sysinternals - www.sysinternals.com


powershell exited on _Hostname_ with error code -196608.

"C:\ProgramData\Packages" folder is also permission-sensitive

Quick foreword, I managed to hose my OS permissions while trying to clean up some old backups. Took ownership of a folder from an old drive that was refusing to delete, which hit a symlink "mine" that made the script work itself onto C:, and of course I dug my hole even deeper while trying to fix whatever that broke. Oops.

Anyway, this script fixed most of everything I broke, which went from all UWP things refusing to work and/or install with a 0x80070005 error, into just some things refusing to install (test case was MS's Xbox app). Some related errors from the event viewer that hopefully some search engine will pick up on and lead here some poor soul who fell into the same circle of hell that I did:

5282 Creation of the secure system app data folder failed with error code : 0x800700B7.
5252 An internal error occurred with error 0x800700B7. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
306 error 0x800700B7: While processing the request, the system failed to register the windows.stateExtension extension due to the following error: Cannot create a file when that file already exists.
316 error 0x800700B7: Cannot register the request because the following error was encountered during the registration of the windows.stateExtension extension: Cannot create a file when that file already exists.
5252 An internal error occurred with error 0x800703FA. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment issues.
331 error 0x800703FA: While reverting the request, the system failed to de-register the windows.stateExtension extension due to the following error: Illegal operation attempted on a registry key that has been marked for deletion.

The final problem ended up being the C:\ProgramData\Packages folder, which doesn't seem to have nearly as complicated permissions as C:\Program Files\WindowsApps and %localappdata%\Packages, but it's similarly sensitive and will break a ton of UWP things if its permissions are changed slightly.

Ultimately I fixed my own issue by going into a full system backup from a few days prior, and using icacls /save and /restore to copy the old permissions back over. "Just restore a backup", while not bad advice, is also generally not useful, so perhaps it would be appropriate to write some extra code into this script that could programmatically fix this folder up too. I could try to describe what the permissions should be, but you probably have a better understanding of this than I do, so it would probably be much more informative to just look at the folder permissions yourself.

Thanks and stuff, the script is very useful.

Access is denied on psexec as admin.

My account can't open windows apps (windows can't access path or device) such as Nvidia control panel or Forza 5, yet a new account can. (and I have fucked around with the permissions before)

Tried using psexec locally on an admin CMD and an admin PS, I even tried adding -h and I get Access is denied.
How can you get Access is denied on a SYSTEM level execution?

I wish for a fix.
Thank you for your effort making this script!!!!!

Output:

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

Fixing WindowsApps permissions...
[RED TEXT]
.
.
.
Get-ChildItem : Could not find a part of the path 'C:\Program
Files\WindowsApps\SUPERHOTTeam.533673F36228B_1.2.13.0_x64__hj98apedv0ctt'.
At C:\Utilities\WindowsAppsUnfukker-main\WindowsAppsUnfukker.ps1:110 char:18

  • ... pxFolders = Get-ChildItem $WinAppsPath -Filter 'AppxMetadata' -Depth ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ReadError: (C:\Program File...__hj98apedv0ctt:String) [Get-ChildItem], DirectoryNotFound
      Exception
    • FullyQualifiedErrorId : DirIOError,Microsoft.PowerShell.Commands.GetChildItemCommand

[end of RED TEXT]

Fixing WindowsApps subfolders inheritance...
Successfully processed 270 files; Failed processing 1 files

Fixing WindowsApps subfolders permissions...

Fixing AppData Packages permissions, this could take a couple minutes...
C:\Users\Cohen\AppData\Local\Packages: Access is denied.
C:\Users\Cohen\AppData\Local\Packages*: Access is denied.
Successfully processed 0 files; Failed processing 2 files
C:\Users\Cohen\AppData\Local\Packages: Access is denied.
Successfully processed 0 files; Failed processing 1 files

There's another component to fix

Often when people are getting these errors, it's either the 2 folders you're fixing, or the permissions on

C:\ProgramData\Microsoft\Windows\AppRepository

Can you please adjust your script to also include fixing that folder as well if it's screwed?

There is TOO MUCH bad advice online regarding changing the permissions on that folder, like adding the user to the permissions and taking ownership. All of those things completely bones the store apps.

Attempt to execute a not autorised change

So, I somehow messed up my WindowsApps folder on my D drive and found this tool. It doesn't seem to work however and I'm not completly sure why.
image
Here is the error code that CMD gave me if you need it
image

Script didn't fully work

I messed up my WindowsApps folder and came across this repository while researching on how to fix the folder.
The script was successful in resetting the permissions of the folder.
Unfortunately, it didn't fix the "File cannot be accessed" error

BUT, I did manage to find a fix on some obscure microsoft post
What fixed it for me is enabling the "Replace all child objects permissions..." at the bottom of the advanced security tab
in the Appdata folder C:\Users\Username\Appdata
After doing that all the errors went away.
image

(P.S. tysm for making this script it really helped me out 🙂)

Error code

Like many others i tweaked with the permissions on the windowsapp folder (thanks to all those websites who said it wouldn't amount to much) and i'm trying to fix most of my apps not opening anymore by running your script
Not sure if you still answer to issues but this is the error message that i got after running the command and i haven't seen it anywhere else
PAExec v1.29 - Execute Programs Remotely
Copyright (c) 2012-2021 Power Admin LLC
www.poweradmin.com/PAExec

Connecting to {local server}...
Failed to impersonate [] - continuing anyway. The handle is invalid. [Err=0x6, 6]
Failed to copy [C:\Program Files\PA Server Monitor\PAExec.exe] to [C:\WINDOWS\PAExec-21688-LAPTOP-MP14BU94.exe] -- going to try to continue anyway. Access is denied. [Err=0x5, 5]
Starting PAExec service on {local server}...
Failed to connect to Service Control Manager on {local computer}. Access is denied. [Err=0x5, 5]
Failed to install service on {local computer} The handle is invalid. [Err=0x6, 6]

PAExec returning exit code -6

Windows 11

Confirmed - Worked like a dream for me first try - yes he is a god heh...

Didn't work all the way

I messed up doing take own on Windowsapps.... because Nvidia control panel didnt want to launch because of the path, yada yada yada, after running the script it still doesn't work either

Now the xbox app quits on startup, any ideas? tried reinstalling it, resetting the xbox app/repairing

Also game bar is broken doesnt work

Failed Processing xx files

How do I analyze the "Failed processing 14 files" file?

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

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

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

Fixing WindowsApps subfolders permissions...
Fixing C:\Program Files\WindowsApps\DolbyLaboratories.DolbyVisionAccess_2.20301.388.0_x64__rz1tebttyb220
Fixing C:\Program Files\WindowsApps\Microsoft.D3DMappingLayers_1.2403.8.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.DirectXRuntime_9.29.1974.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.DirectXRuntime_9.29.1974.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.HEIFImageExtension_1.0.63001.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.HEVCVideoExtension_2.0.61931.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Ink.Handwriting.en-US.1.0_0.237.110.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Ink.Handwriting.en-US.1.0_0.237.110.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.3_1.3.24211.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.3_1.3.24211.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.1_2.1.27427.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.1_2.1.27427.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.1_2.1.26424.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.1_2.1.26424.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.RawImageExtension_2.3.611.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Services.Store.Engagement_10.0.23012.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Services.Store.Engagement_10.0.23012.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.7_7.2208.15002.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.7_7.2208.15002.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.8_8.2306.22001.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.8_8.2306.22001.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.8_8.2310.30001.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.8_8.2310.30001.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.110.00.UWPDesktop_11.0.61135.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.110.00.UWPDesktop_11.0.61135.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.110.00_11.0.51106.1_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.110.00_11.0.51106.1_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00.UWPDesktop_12.0.40653.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00.UWPDesktop_12.0.40653.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.32530.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.33321.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.33519.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.33519.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.32530.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.32530.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.33321.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.33321.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.33519.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.33519.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VP9VideoExtensions_1.1.451.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WebpImageExtension_1.0.62681.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.1_1005.616.1651.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.1_1005.616.1651.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.802.31.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.802.31.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.3_3000.934.1904.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.3_3000.934.1904.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1010.1349.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1049.117.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1082.2259.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1136.2333.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.1136.2333.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.4_4000.986.611.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.70.1338.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.70.1338.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Deleted\Microsoft.Paint_11.2401.20.0_x64__8wekyb3d8bbwe8ffc5311-f0ee-4843-a32a-92ddc44ec831

Fixing AppData Packages permissions, this could take a couple minutes...
Backup of existing permissions...
Successfully processed 0 files; Failed processing 0 files
Saved to C:\Users\michael\AppData\Local\Packages_20240328_002044.txt
Successfully processed 82670 files; Failed processing 0 files
processed file: C:\Users\michael\AppData\Local\Packages
Successfully processed 1 files; Failed processing 0 files

Fixing ProgramData Packages permissions...
Backup of existing permissions...
Successfully processed 0 files; Failed processing 0 files
Saved to C:\ProgramData\Packages_20240328_002201.txt
Successfully processed 1 files; Failed processing 0 files
Successfully processed 378 files; Failed processing 0 files
Successfully processed 378 files; Failed processing 0 files
Successfully processed 378 files; Failed processing 0 files

Unfukking finished!! (hopefully)

Press Enter to continue...:

PSExec issue

PSExec will not run properly if you have non standard alphanumeric characters in your PC name. For example, "Pushin 🅿"

Thanks, it worked.

The MS bashing was kind of childish on your part, could've been executed better, but the script itself worked on the latest 22H2 build of Windows 11.

PsExec could not start powershell

Hello,
I am running W11 22H2. I have been trying to fix my WindowsApps folder that I messed up permissions for and came across your script. However, it's not working for some reason on my PC. I keep getting the "PsExec could not start powershell…" error. I was wondering if you could assist me a bit. Any help will be truly appreciated.

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\manav> cd J:\Users\manav\Downloads\PSTools
PS J:\Users\manav\Downloads\PSTools> .\psexec.exe -s -i powershell -ExecutionPolicy Bypass -File "J:\Users\manav\Downloads\WindowsAppsUnfukker-main\WindowsAppsUnfukker.ps1"

PsExec v2.4 - Execute processes remotely
Copyright (C) 2001-2022 Mark Russinovich
Sysinternals - www.sysinternals.com


PsExec could not start powershell on DESKTOP-99N6EMR:
The system cannot find the file specified.

Literally not an issue

I will LITERALLY suck you off right now.

I crawled on walls trying to solve fucking windowsapps for multiple hours, and you know what fixed it? Your script!

Not windows with its billion "fix it!" apps, troubleshooting, I even REINSTALLED windows only to be met with the issue still staying the same.

How???????

Essentially, thank you SO MUCH if you're interested in trans girls I will LITERALLY suck you off

Have a good life, rain should fall anywhere but on you, as you're a GOD that SAVED ME and I will literally pray to your existence

Didn't help, errors when trying to update or uninstall apps

Had a good feeling about this one, but alas, didn't seem to work against my problem.

I can't update or uninstall any Windows App at all. Whenether i try to uninstall an app, i get an 0x80073CFA error, and when i try to update one, i get an 0x80073CF9 error. Installing new apps seems to be working though, although i'm not sure if it'd be possible to update them in the future.

I would imagine all my woes started with me removing some bloatware from my laptop, guess i wasn't careful enough about that. Sadly, i don't remember what and how i removed back then, it must have been a few years since i did that.

Unable to Run

Nevermind your boy was being stupid due to stress of botching his legion go lol
this is my issue
paexec -s -i powershell -ExecutionPolicy Bypass -File C:\Users\wrait\Downloads\WindowsAppsUnfukker.ps1" "%LocalAppData%"
with a response that looks like this
PAExec v1.29 - Execute Programs Remotely
Copyright (c) 2012-2021 Power Admin LLC
www.poweradmin.com/PAExec

Connecting to {local server}...
Failed to impersonate [] - continuing anyway. The handle is invalid. [Err=0x6, 6]
Starting PAExec service on {local server}...

powershell returned -196608

PAExec returning exit code -196608

What do I need to do?

no effect

i KNOW your script work because i sucessfully used it to fix my system in the past (even kept a copy in my external drive. )

i recently fucked the folder up again (i wanted to delete 7gb of skype instaler that no one on this planet use but microsoft keep having us download)

but now, neither the old script back or the new version of your script work. i literaly ran every version of it.
every single apps still don't work (tipical cues are windows photo trowing errors about jpeg not existing and microsoft store not oppening)

and i disgust the idea that even if i reset windows or migrate to windows 11 the issue might persist. leaving me with potentialy having to buy a 2nd nvme, plug it in my machine. instaling windows on that 2nd nvme. then migrating my user folder and date from 1 drive to the other. (potentialy finding myself with no functional machine for a few week.

hm.... come to think of it. with the price of nvme today i might do that and turn the previous nvme into a mountain of virtual memory by asighing 900 gb of virtual memory on it trought the system.

this seem like a massive oversight that sfc/scannow or dism or system restore doesnt fix system folders permission.

so i can't fix my windowsapps folder. even tough i have the technical knowledge to do so and the wilingness to.

this script sadly might have to be temporarily advertised as non-functional until it work.

(by the way, paexec is a typo. its minor but if left there, it will create even more confusion.)

WARNING: AppData Packages not found

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

Fixing WindowsApps permissions...

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

Fixing WindowsApps subfolders permissions...
Fixing C:\Program Files\WindowsApps\Microsoft.Advertising.Xaml_10.1808.3.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.DirectXRuntime_9.29.1974.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.DirectXRuntime_9.29.1974.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Getstarted_10.2210.3.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.HEIFImageExtension_1.0.43012.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackar-SA_19041.42.130.0_neutral__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.LanguageExperiencePackar-SA_19041.43.138.0_neutral__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.MinecraftUWP_1.19.6003.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.1.7_1.7.27413.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.0_2.0.27427.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.0_2.0.27427.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.2_2.2.27405.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.7_1.7.25531.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.1.7_1.7.27422.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.0_2.0.25709.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.0_2.0.25709.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.2_2.2.27328.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Services.Store.Engagement_10.0.19011.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.Services.Store.Engagement_10.0.19011.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.0_2.1810.18004.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.0_2.1810.18004.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.1_2.11906.6001.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.1_2.11906.6001.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.3_2.32002.13001.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.3_2.32002.13001.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.4_2.42007.9001.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.5_2.52012.2002.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.5_2.52012.2002.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.6_2.62112.3002.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.6_2.62112.3002.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.7_7.2208.15002.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.7_7.2208.15002.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.8_8.2212.15002.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.UI.Xaml.2.8_8.2212.15002.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.110.00.UWPDesktop_11.0.61135.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.110.00.UWPDesktop_11.0.61135.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00.UWPDesktop_12.0.40653.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.120.00.UWPDesktop_12.0.40653.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.27629.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30704.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.27323.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.30704.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VCLibs.140.00_14.0.30704.0_x86__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.VP9VideoExtensions_1.0.52781.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Microsoft.WebpImageExtension_1.0.52351.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Resources\Microsoft.4297127D64EC6_1.1.28.0_x64__8wekyb3d8bbwe
Fixing C:\Program Files\WindowsApps\Resources\Microsoft.MinecraftJavaEdition_1.0.5.0_x64__8wekyb3d8bbwe

WARNING: AppData Packages not found, please file a GitHub issue here:
https://github.com/AgentRev/WindowsAppsUnfukker/issues
Copy-paste this in the description: C:\Users\mustafa\AppData\Local\Packages

you are a legend

messed up the windowsapp permission and couldnt access windows terminal anymore and this fixed ittttttt

Successfully processed but still "Paramater Incorrect Error"

Since psexec is not working for me i did it with nirsofts nircmd tool (actually advancedrun does the same to run as system admin). And the result is :

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\Users\kali\Desktop\son\WindowsAppsUnfukker.ps1"

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

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

Fixing WindowsApps permissions...

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

Fixing WindowsApps subfolders permissions...
Fixing C:\Program Files\WindowsApps\Microsoft.WindowsTerminal_1.16.10261.0_x64__8wekyb3d8bbwe

Fixing AppData Packages permissions, this could take a couple minutes...
Successfully processed 7196 files; Failed processing 0 files
processed file: C:\Users\kali\AppData\Local\Packages
Successfully processed 1 files; Failed processing 0 files

Unfukking finished!! (hopefully)"

Why do i still get the paramater inccorrect error when i try to run windows store apps?

Can you please help me with that. I just reverted back to windows 10 from windows 11 and thought it was related to windows 11. But now windows 10 has the same error.

Can you add support for repairing the ProgramData/Packages folder too?

Hey,

I ran your program and like magic it restored all my apps, except for the windows store. However, I was able to figure out that the permissions on the C:\ProgramData\Packages folder were still the old ones. And that these old permissions were causing the windows store app to not load. So, in order to fix this, I simply copied these permissions:

D:PAI(A;;FA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;OICIIO;GA;;;S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464)(A;;0x1200a9;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;OICIIO;GXGR;;;S-1-15-3-1024-3635283841-2530182609-996808640-1887759898-3848208603-3313616867-983405619-2501854204)(A;;FA;;;SY)(A;OICIIO;GA;;;SY)(A;CI;0x1200a9;;;BA)(A;OICI;0x1200a9;;;LS)(A;OICI;0x1200a9;;;NS)(A;OICI;0x1200a9;;;RC)(XA;;0x1200a9;;;BU;(Exists WIN://SYSAPPID))

to the ProgramData\Packages folder and then set the owner to nt service\trustedinstaller and it worked!

Just opening this issue so the tool can be updated to also fix permissions for the Packages folder, which should help people who had a similar problem as mine.

Is there a code to change system settings to what they were before i started messing with it?

I spent many hours surfing through the web as I messed up the permissions on my PC and as soon as i realised what I've done I tried everything that i could find with my limited knowledge, and none of it worked!

I have no idea what you did or how you did it, but thank you so much..

I have messed about with everything on the pc including changing permissions and making bypasses through the computer's barriers so i could run this code and other ones..

I guess I should change everything back to original so my PC is secure, is there a code for this or should i just format my PC?

"Failed to impersonate [] - continuing anyway. The handle is invalid. [Err=0x6, 6]"

Wish I could use this script to unfuck my royally fucked pc but I keep running into this error:

Failed to impersonate [] - continuing anyway. The handle is invalid. [Err=0x6, 6]
Starting PAExec service on {local server}...

powershell returned -196608

PAExec returning exit code -196608

EDIT: Tried running with my firewall disabled as #5 said to do but it didn't work :p

Microsoft Store still not working

I took ownership of Windows Apps to look inside.
Then used your script to fix it. My windows apps seem to run fine with the exception of the Microsoft Store itself.
When I try running it, nothing happens.
In Event Viewer (System), I do see "The server Microsoft.WindowsStore_22402.1401.4.0_x64__8wekyb3d8bbwe!App did not register with DCOM within the required timeout."

I tried add-appxpackage but it made no difference.

Any ideas?

Are you God?

Thank you SO much for this script! I ended up hosing WindowsApps because I couldn't get an app that I sideloaded to launch properly. Ended up going inside & modifying the permissions. Ended up breaking Nvidia Control Panel & God knows what else. I LOATHE UWP & the Windows Store & can't wait for the day when they both slowly & painfully die in a fire.

THANK YOU SO MUCH!

PS: I suggest using Paexec instead of Psexec. Had trouble running Psexec (couldn't run the script, couldn't run powershell, cmd as SYSTEM - complained about some network path not being found after trying to get some authentication key, whatever that is). Using Paexec worked first try.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.