From 39963666b8f3a2a1b2ddb956d01090caf3bf8b53 Mon Sep 17 00:00:00 2001 From: zekroTJA Date: Sun, 1 Feb 2026 14:41:21 +0100 Subject: [PATCH] add evolution start script --- powershell/evolution-startup.ps1 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 powershell/evolution-startup.ps1 diff --git a/powershell/evolution-startup.ps1 b/powershell/evolution-startup.ps1 new file mode 100644 index 0000000..06a5293 --- /dev/null +++ b/powershell/evolution-startup.ps1 @@ -0,0 +1,32 @@ +$OBS_PATH = "C:\Program Files\obs-studio\bin\64bit\obs64.exe" +$FOOBAR_PATH = "C:\Program Files\foobar2000\foobar2000.exe" +$MODRINTH_PATH = "C:\Users\riho\AppData\Local\Modrinth App\Modrinth App.exe" +$BONGOCAT_LAUNCH_PATH = "steam://rungameid/3419430" +$BONGOCAT_PROCESS_NAME = "BongoCat" + + +function Open-If-Not-Already { + param ( + [Parameter(Mandatory = $true)] + [string]$Path, + [string]$ProcessName, + [string]$WorkingDirectory = (Get-Location).Path + ) + + if (-not $ProcessName) { + $ProcessName = (Get-Item $Path).BaseName + } + + if (-not (Get-Process -Name "$ProcessName" -ErrorAction SilentlyContinue)) { + Write-Output "Starting $ProcessName ($Path) ..." + Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" + } + else { + Write-Output "$ProcessName is already running." + } +} + +Open-If-Not-Already -Path "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName +Open-If-Not-Already -Path "$FOOBAR_PATH" +Open-If-Not-Already -Path "$MODRINTH_PATH" +Open-If-Not-Already -Path "$BONGOCAT_LAUNCH_PATH" -ProcessName "$BONGOCAT_PROCESS_NAME"