diff --git a/windows/installers/outerwilds-modmanager.bat b/windows/installers/outerwilds-modmanager.bat new file mode 100644 index 0000000..83904cc --- /dev/null +++ b/windows/installers/outerwilds-modmanager.bat @@ -0,0 +1,23 @@ +@ECHO OFF + +:: Start as administrator +fltmc >NUL 2>&1 || ( + PowerShell Start -Verb RunAs '%0' 2>NUL || ( + EXIT 1 + ) + EXIT 0 +) + +ECHO Outer Wilds Mod Manager... +PowerShell -Command "" ^ + "$repo = 'ow-mods/ow-mod-man';" ^ + "$releases = \"https://api.github.com/repos/$repo/releases/latest\";" ^ + "$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url[7];" ^ + "$exe = 'Outer.Wilds.Mod.Manager-setup.msi';" ^ + "$outFile = Join-Path -Path $env:TEMP -ChildPath $exe;" ^ + "Invoke-WebRequest -Uri $link -OutFile $outFile;" ^ + "Start-Process -Wait $outFile '/quiet', '/passive', '/qn';" ^ + "Remove-Item -Force $outFile" + +IF NOT "%1"=="yes" PAUSE +EXIT /B