Powershell 自动探测

This commit is contained in:
2023-11-07 22:35:25 +08:00
parent 183864054e
commit 7257e34653
8 changed files with 37 additions and 12 deletions

View File

@ -350,7 +350,7 @@ class HomeUIModel extends BaseUIModel {
}
openDir(rsiLauncherInstalledPath) async {
await Process.run("powershell.exe",
await Process.run(SystemHelper.powershellPath,
["explorer.exe", "/select,\"$rsiLauncherInstalledPath\""]);
}
@ -489,7 +489,7 @@ class HomeUIModel extends BaseUIModel {
return;
}
if (isCurGameRunning) {
await Process.run("powershell.exe", ["ps \"StarCitizen\" | kill"]);
await Process.run(SystemHelper.powershellPath, ["ps \"StarCitizen\" | kill"]);
return;
}
AnalyticsApi.touch("gameLaunch");