Skip to content

Commit

Permalink
Merge pull request #4 from Slime-hatena/develop
Browse files Browse the repository at this point in the history
Release 1.1.0
  • Loading branch information
slime-hatena authored Apr 13, 2021
2 parents c8d48fa + 6b94eb5 commit b1ab5f3
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions bin/start.ps1
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
Add-Type -Assembly System.Windows.Forms;

# dmmgames launcherは管理者権限で動くので昇格させる
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
# steamがゲーム起動中の判定に使うためwaitしておく
Start-Process powershell -WindowStyle hidden -Wait -Verb runAs -ArgumentList $myinvocation.mycommand.definition;
exit;
}

# ゲーム起動
Start-Process "dmmgameplayer://umamusume/cl/general/umamusume";
$c = 0;
Expand All @@ -20,6 +13,8 @@ do {
Get-Process -Name umamusume;
} while (!$?);

# 起動を確認したらゲーム終了まで待ち、dmmgames launcherを終了
Wait-Process -Name umamusume;
Stop-Process -Name DMMGamePlayer;
do {
# プロセスが取得できなくなったら終了したと見なす
Start-Sleep -s 5;
Get-Process -Name umamusume;
} while ($?);

0 comments on commit b1ab5f3

Please sign in to comment.