Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access is denied on psexec as admin. #3

Open
yossi2010 opened this issue Dec 1, 2021 · 8 comments
Open

Access is denied on psexec as admin. #3

yossi2010 opened this issue Dec 1, 2021 · 8 comments

Comments

@yossi2010
Copy link

yossi2010 commented Dec 1, 2021

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

@AgentRev
Copy link
Owner

AgentRev commented Dec 2, 2021

Huh, that's weird... I think I know what's wrong for Superhot, but I'm confused about the AppData errors. Can you provide a screenshot of the Security > Advanced panel for C:\Users\Cohen\AppData\Local\Packages?

@yossi2010
Copy link
Author

It is owned by my user and only my user is listed in the permissions list as "full access"

@AgentRev
Copy link
Owner

AgentRev commented Dec 3, 2021

Normally, the Packages folder is supposed to inherit SYSTEM Full control from C:\Users\Username, you must have fukked it beyond what the script can handle 😂

@yossi2010
Copy link
Author

well I get “Failed to Enumerate Objects in the Container. Access is denied.” when trying to apply the root user security values to the subfolders.

same as when I try to change the security settings on the WindowsApps

FFS how can my access be denied if I'm the damn Admin???? Linux will self destruct if I tell it so with admin privileges.
Going to safe mode to try and fix it from there.

@AgentRev
Copy link
Owner

AgentRev commented Dec 3, 2021

Maybe try running the script without psexec? (remove the SYSTEM user verification from the script)

@yossi2010
Copy link
Author

Going to safe mode to try and fix it from there. doing this fixed the issue without having to run the unfukker.
Apparently if SYSTEM (and administrators) don't have access to appdata/packages it is bad.
So I appllied the appdata security settings to all the subfolders and it fixed the "windows can't access path or device" (just like it is on the new account I made).

@vgf89
Copy link

vgf89 commented Apr 7, 2022

OMG thank you for the hints! I clicked the "Enable Inheritance" button for "C:\Users\username\AppData\Local\Packages" which added the SYSTEM permissions automatically, then I re-ran unfukker. Everything finally works and the script didn't have any errors. Finally my windows store apps can start more than once without breaking. Windows 11 btw.

@e-t-l
Copy link
Contributor

e-t-l commented Nov 9, 2023

I'm having a somewhat similar issue. I am trying to make one small change to a WindowsApps\ file (basically just renaming it with ren), and I don't want to fukk up the permissions, so I tried doing it with PSEXEC. Even though I'm in the PSEXEC shell, and running whoami returns "nt authority\system", attempting ren on a file in WindowsApps returns "Access is denied." If I go to file permissions, I see that SYSTEM does have full permissions, as expected (this is a brand new PC, so no chance to get fukked up yet). Any suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants