-
Notifications
You must be signed in to change notification settings - Fork 24
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
"Failed to impersonate [] - continuing anyway. The handle is invalid. [Err=0x6, 6]" #9
Comments
Are you running the script with PSexec or PAexec? |
Same issue, no clue how to solve it. |
-196608 is the error code usually returned by PowerShell when it cannot resolve the path from the |
I thought using a relative path when starting the script from the same directory WindowsAppsUnfukker.ps1 is in would work, but apparently I was wrong. Using the absolute path to the file instead worked, unfortunately the script didn't fix my error, oh well. |
What is the error you're getting? I'm planning to release an update this week to cover another type of error somebody else found, maybe it will solve it |
I got this error when using powershell, threw up the same unable to impersonate error.
|
What is the exact command line that you initially wrote? |
I removed the paexec.exe -s -i to get the full error message. I also cd' into the paexec directory beforehand. |
I think you downloaded the script incorrectly, the |
That worked, but I'm still having problems with Windows Apps. Thanks anyway! |
I'm having this problem on a windows 11 PC. When I try to view properties of "C:\Program Files\WindowsApps", I get a warning that I can't read the permissions (edit: I think this is just the difference between another PC with UAC disabled vs this PC that prompts for UAC). I have paexec and this script in c:\mike and get:
Any idea where to go from here? Thanks in advance! |
If you enter |
Sorry, I missed that.
|
Huh, weird. How about with PsExec? https://learn.microsoft.com/en-us/sysinternals/downloads/psexec |
|
Looks good, did it fix your original problem? |
Unfortunately not, I still cannot open Windows Store or open any store apps like Photos. |
Hmm, maybe it's the AppRepository folder, which I haven't had the time to implement yet. It will definitely take an entire day to tear it apart and test the result, and I just don't have that kinda spare time at the very moment. |
Yeah, I think so. I tried mucking with it but still got access denied and made things worse. I tried doing an export/import of permissions using icacls but the import didn't get any matches and didn't do anything. Ended up doing a clean install and migrating using pcmover and luckily the store still worked. Appreciate your help and your contribution to fixing this problem. |
POSTING MY MISTAKE WITH ANSWER BELOW `C:\Temp\WindowsAppsFix>paexec -s -i powershell -ExecutionPolicy Bypass -File "C:\Temp\WindowsAppsFix\WindowsAppsUnfukker.ps1" "%LocalAppData%" PAExec v1.29 - Execute Programs Remotely Connecting to {local server}... powershell returned 1 PAExec returning exit code 1 C:\Temp\WindowsAppsFix>` CLARIFICATION FOR FUTURE READERS |
Just wanted to comment it worked for me after trying different things. It can be kind of difficult for some if you are not too familiar with CMD or Shell, not even to mention PsExec or its variant.
Have to say I've been trying to run the code for about 2 hours straight and I was about to give up, but then I tried using PsExec as some suggested and it did the trick. After the code runs successfully, I think it takes about 5 - 10 minutes to complete, but maybe it depends on your system. After the process completed, I was able to run my programs again as usual and I no longer have permission to open the "WindowsApps" folder Now, I just want to say: Thank you! |
Hello @AgentRev, please help. I have a very similar error and I really need help to unfukk this windows. PAEXEC:paexec -s -i cmd /C powershell -ExecutionPolicy Bypass -File "C:\Users\Username\Documents\Herramientas\WindowsAppsUnfukker-main\WindowsAppsUnfukker.ps1" "%LocalAppData%" ^|^| pause Powershell: Welcome to the amazing WindowsApps Unfukker! Please sit tight!! Fixing WindowsApps permissions... Fixing WindowsApps subfolders inheritance... Fixing WindowsApps subfolders permissions... Fixing AppData Packages permissions, this could take a couple minutes... Fixing ProgramData Packages permissions... Unfukking finished!! (hopefully) CMD: PAExec v1.29 - Execute Programs Remotely Connecting to {local server}... cmd returned -0 PAExec returning exit code -0 PSEXEC:psexec -s -i cmd /C powershell -ExecutionPolicy Bypass -File "C:\Users\Username\Documents\Herramientas\WindowsAppsUnfukker-main\WindowsAppsUnfukker.ps1" "%LocalAppData%" ^|^| pause PsExec v2.43 - Execute processes remotely Error creating key file on IMPRTNS: Please Help. After all that Windows Store is still not working and apps are still not opening. |
@imprtns The PAExec run looks fine. "Failed to impersonate" shouldn't be a problem if the exit code is 0. However, it says nothing under "Fixing WindowsApps subfolders permissions..." which is strange. Do you have a screenshot of the app errors? |
"Failed to impersonate" indeed does not seem to be a problem in and of itself. I did get that message but it is very clear that WindowsAppsUnfukker ran successfully. (I can now launch apps, install apps, etc. Wow! Thanks for a fantastic script!) Here is the output from the cmd.exe window:
Maybe there is something in my choice of folders for paexec or WindowsAppsUnfukker that paexec does not like? |
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
The text was updated successfully, but these errors were encountered: