mirror of
https://github.com/MustardChef/WSABuilds.git
synced 2024-12-26 19:31:49 +01:00
Merge pull request #357 from 1552980358/master
Fix Windows 10 installation Appx commands error when pwsh.exe installed
This commit is contained in:
commit
52191a20dd
@ -38,6 +38,10 @@ function Get-InstalledDependencyVersion {
|
||||
}
|
||||
}
|
||||
|
||||
Function Check-Windows11 {
|
||||
RETURN (Get-ComputerInfo | Select-Object -expand OsName) -match 11
|
||||
}
|
||||
|
||||
Function Test-CommandExist {
|
||||
Param ($Command)
|
||||
$OldPreference = $ErrorActionPreference
|
||||
@ -53,10 +57,9 @@ Function Finish {
|
||||
Start-Process "wsa://com.android.vending"
|
||||
}
|
||||
|
||||
If (Test-CommandExist pwsh.exe) {
|
||||
If ((Check-Windows11) -And (Test-CommandExist 'pwsh.exe')) {
|
||||
$pwsh = "pwsh.exe"
|
||||
}
|
||||
Else {
|
||||
} Else {
|
||||
$pwsh = "powershell.exe"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user