confOS/windows/fix_obs_shortcut.bat

19 lines
718 B
Batchfile

@ECHO OFF
:: Start as administrator
fltmc >NUL 2>&1 || (
PowerShell Start -Verb RunAs '%0' 2>NUL || (
EXIT 1
)
EXIT 0
)
PowerShell -Command "$WshShell = New-Object -COM WScript.Shell;" ^
"$Shortcut = $WshShell.CreateShortcut('%ProgramData%\Microsoft\Windows\Start Menu\Programs\OBS Studio\OBS Studio (64bit).lnk');" ^
"$Shortcut.TargetPath = '%ProgramFiles%\obs-studio\bin\64bit\obs64.exe';" ^
"$Shortcut.WorkingDirectory = '%ProgramFiles%\obs-studio\bin\64bit';" ^
"$Shortcut.Arguments = '--profile ""ANRI GAMING (PROFIL)"""" --multi';" ^
"$Shortcut.Save()"
IF NOT "%1"=="noskip" PAUSE
EXIT /B