From 1472f3538b2140a7132f3c2961a8194efdbdc609 Mon Sep 17 00:00:00 2001 From: zekroTJA Date: Sun, 1 Mar 2026 15:20:48 +0100 Subject: [PATCH] add startup command line params for obs --- powershell/evolution-startup.ps1 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/powershell/evolution-startup.ps1 b/powershell/evolution-startup.ps1 index 06a5293..48ff062 100644 --- a/powershell/evolution-startup.ps1 +++ b/powershell/evolution-startup.ps1 @@ -10,7 +10,8 @@ function Open-If-Not-Already { [Parameter(Mandatory = $true)] [string]$Path, [string]$ProcessName, - [string]$WorkingDirectory = (Get-Location).Path + [string]$WorkingDirectory = (Get-Location).Path, + [string[]]$Args = $null ) if (-not $ProcessName) { @@ -19,14 +20,19 @@ function Open-If-Not-Already { if (-not (Get-Process -Name "$ProcessName" -ErrorAction SilentlyContinue)) { Write-Output "Starting $ProcessName ($Path) ..." - Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" + if ($Args -eq $null) { + Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" + } else { + Write-Output "Opening with args $Args" + Start-Process "$Path" -WorkingDirectory "$WorkingDirectory" -ArgumentList "$Args" + } } 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 "$OBS_PATH" -WorkingDirectory (Get-Item "$OBS_PATH").DirectoryName -Args $("--profile", "rec-gaming", "--collection", "rec-gaming", "--scene", "evolution") 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"