There was an error while loading. Please reload this page.
2 parents 7da3a91 + c67866a commit 52191a2Copy full SHA for 52191a2
MagiskOnWSA/installer/Install.ps1
@@ -38,6 +38,10 @@ function Get-InstalledDependencyVersion {
38
}
39
40
41
+Function Check-Windows11 {
42
+ RETURN (Get-ComputerInfo | Select-Object -expand OsName) -match 11
43
+}
44
+
45
Function Test-CommandExist {
46
Param ($Command)
47
$OldPreference = $ErrorActionPreference
@@ -53,10 +57,9 @@ Function Finish {
53
57
Start-Process "wsa://com.android.vending"
54
58
55
59
56
-If (Test-CommandExist pwsh.exe) {
60
+If ((Check-Windows11) -And (Test-CommandExist 'pwsh.exe')) {
61
$pwsh = "pwsh.exe"
-}
-Else {
62
+} Else {
63
$pwsh = "powershell.exe"
64
65
0 commit comments