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

Win11 Pro Fail #2403

Closed
Tuefelhund opened this issue Jul 18, 2024 · 13 comments
Closed

Win11 Pro Fail #2403

Tuefelhund opened this issue Jul 18, 2024 · 13 comments
Labels

Comments

@Tuefelhund
Copy link

Screenshot 2024-07-18 133120

I7 12700k cpu
64k ram

Fail to run, install, or load.

@MyDrift-user
Copy link
Contributor

MyDrift-user commented Jul 18, 2024

Hey @Tuefelhund
Try setting your language mode to FullLanguage like this:
Run that as an administrator

$ExecutionContext.SessionState.LanguageMode = "FullLanguage"

Credit: @CodingWonders

@CodingWonders
Copy link
Contributor

That is the fix for this issue. Now, @MyDrift-user, we should add detections for language modes right at the beginning.

In a previous instance of this issue, I added a link to a detection script. Here it is if you want to see it: http://bin.christitus.com/evalulofaj

@MyDrift-user
Copy link
Contributor

MyDrift-user commented Jul 18, 2024

Thanks @CodingWonders, will work on it rn :)

should we ask the user if he is okay with that and run it automatically if he sais yes?

@CodingWonders
Copy link
Contributor

It would be a recommendation. The command will not be run automatically, so the user will have to manually run it.

@MyDrift-user
Copy link
Contributor

MyDrift-user commented Jul 18, 2024

modified it like that because the other language modes are even worse:

if ($ExecutionContext.SessionState.LanguageMode -ne 'FullLanguage')
{
    Write-Host "Current language mode is $($ExecutionContext.SessionState.LanguageMode)"
    Write-Host "Many PowerShell commands are disabled in this mode. Please run:"
    Write-Host "  `$ExecutionContext.SessionState.LanguageMode = `"FullLanguage`""
    exit
}

@CodingWonders
Copy link
Contributor

That's good. The script I linked was just a sample. This is better. Now, it should be added right when the script is started

@MyDrift-user
Copy link
Contributor

MyDrift-user commented Jul 18, 2024

ya added it into start.ps1
will create a pr soon

sadly can't start the script that easily bc the command to compile & start is disabled

@CodingWonders
Copy link
Contributor

That is the bad thing about constrained language. You would need to compile the script in the full language mode. According to this Stack Overflow post, it should reset if set manually:

If you just opened an Administrative PowerShell window and turned on Constrained mode via the "LanguageMode" variable to see what would happen and now can't turn it off again, the change made here only applies to this PowerShell session. If you close the terminal window and open a new one you'll see that the Constrained mode setting has not stuck.

@MyDrift-user
Copy link
Contributor

image

@CodingWonders
Copy link
Contributor

That is the thing I'm struggling to fix. You can't easily change from constrained language to full language if set manually and you'd need to start a new PowerShell session.

It's best to do proper testing of that before making a PR. And, possibly, I feel like we need to remove that command if it fails and replace it with another method.

@MyDrift-user
Copy link
Contributor

Ya understood, made an error while testing it... sry bout that

Copy link
Contributor

This issue was marked as stale because it has been inactive for 7 days

@github-actions github-actions bot added the Stale label Jul 26, 2024
Copy link
Contributor

github-actions bot commented Aug 2, 2024

This issue was closed because it has been inactive for 7 days since it was marked as stale

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants