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

updater.bat failing on Windows 11 Home Edition #1769

Closed
PencilVoid opened this issue Nov 21, 2023 · 17 comments
Closed

updater.bat failing on Windows 11 Home Edition #1769

PencilVoid opened this issue Nov 21, 2023 · 17 comments
Labels

Comments

@PencilVoid
Copy link

When running updater.bat, it fails at the "retrieving latest user.js" stage.

Steps to reproduce:

  1. create a user-overrides.js file in the preferred profile folder
  2. download updater.bat and other necessary files from latest release
  3. put them in the preferred profile folder
  4. run updater.bat
  5. press S as prompted to start

Expected result: updater.bat downloads user.js, appends the contents of user-overrides.js, and continues as expected.
Actual result:
2023-11-20_16-49-20-285_WindowsTerminal_JnaSgkORve

Things I have tried, that did not fix it:

  • double-checking WiFi is on
  • running it with admin permissions
  • running it in Powershell
  • running it in Powershell with admin permissions
  • opening ports 9418 and 22 in the firewall
  • installing the PsDownload module (command not recognised)

I managed to use it properly on another machine running Windows 10 Pro Edition by following the steps given in the wiki. The troubleshooting I did leads me to believe it's caused by a difference between 11 Home and 10 Pro.

@Thorin-Oakenpants
Copy link
Contributor

I wonder if 23H2 (The update began rolling out on October 31, 2023) has anything to do with it. I haven't tested anything, btw - this is not really my cup of tea - pinging the bat boffins @earthlng

Can you tell me if this has ever worked for you on that machine, and if so when did it start failing?

@Thorin-Oakenpants

This comment was marked as outdated.

@Thorin-Oakenpants
Copy link
Contributor

hang on - it's in the wiki - https://github.com/arkenfox/user.js/wiki/3.4-Apply-&-Update-&-Maintain#-update-error

My best guess is that you are blocking it - anti virus, firewall, pihole, etc

@PencilVoid
Copy link
Author

Can you tell me if this has ever worked for you on that machine, and if so when did it start failing?

It's never worked on this machine. I first tried it about 2 days before I created the issue.

@Thorin-Oakenpants
Copy link
Contributor

OK, so the issue is not that it doesn't work, but that "something" is blocking it. If we can work it out, I can edit the wiki - e.g. windows 10/11 home users, do "this"

@Thorin-Oakenpants
Copy link
Contributor

Actually, IDK - it could be the script because that error message is from the script

@Thorin-Oakenpants
Copy link
Contributor

can you do this?

test

@PencilVoid
Copy link
Author

image
Seems to work fine.

@earthlng
Copy link
Contributor

earthlng commented Nov 24, 2023

hi,
please remove >nul 2>&1 from line 225 and run it again. This will show the error message in the console.
Let us know what the message says, thanks.

@PencilVoid
Copy link
Author

image

@iam-py-test
Copy link

Would you mind running Get-ChildItem env:\__PSLockDownPolicy and posting the result?
Thanks

@PencilVoid
Copy link
Author

image

@iam-py-test
Copy link

iam-py-test commented Nov 24, 2023

Thanks.
As I suspected, updater.bat runs PowerShell, and PowerShell is running in Constrained Language Mode. You will probably need to disable CLM while running the updater (I think deleting the environment variable is enough).

@PencilVoid
Copy link
Author

Setting the environment variable __PSLockdownPolicy to 8 worked and now updater.bat runs without issue. Thanks for the help.

@Thorin-Oakenpants
Copy link
Contributor

how did you set the environment variable, why chose 8? - so I can add the info to the wiki - TIA

@PencilVoid
Copy link
Author

I did it by opening the Start menu and searching "environment variables". This should pull up "Edit the system environment variables" from the Control Panel. You click on the result, then click on "Environment Variables" at the bottom of the window that pops up. In the window that opens, you can look for "__PSLockdownPolicy" in the list labelled "System variables", and set its value to 8 by selecting it and clicking "Edit...". I set it to 8 as that corresponds to the FullLanguage language mode, according to StackOverflow.

@Thorin-Oakenpants
Copy link
Contributor

updated the wiki - thanks for troubleshooting @PencilVoid 🍕 🍺 🍰

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

No branches or pull requests

4 participants