onthespot installer
This commit is contained in:
parent
71bf3d8bd3
commit
44c4b8a41e
1 changed files with 22 additions and 0 deletions
22
windows/installers/onthespot.bat
Normal file
22
windows/installers/onthespot.bat
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
@ECHO OFF
|
||||||
|
|
||||||
|
ECHO onthespot...
|
||||||
|
MKDIR "%LOCALAPPDATA%\onthespot" 2>NUL
|
||||||
|
PowerShell -Command "" ^
|
||||||
|
"$repo = 'justin025/onthespot';" ^
|
||||||
|
"$releases = \"https://api.github.com/repos/$repo/releases/latest\";" ^
|
||||||
|
"$assets = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets;" ^
|
||||||
|
"$link = ($assets | Where-Object { $_.name -like '*-x86_64.exe' }).browser_download_url;" ^
|
||||||
|
"$exe = 'OnTheSpot-x86_64.exe';" ^
|
||||||
|
"$outfile = Join-Path -Path '%LOCALAPPDATA%\onthespot' -ChildPath $exe;" ^
|
||||||
|
"Invoke-WebRequest -Uri $link -OutFile $outFile;" ^
|
||||||
|
"$WshShell = New-Object -comObject WScript.Shell;" ^
|
||||||
|
"$Shortcut = $WshShell.CreateShortcut('%APPDATA%\Microsoft\Windows\Start Menu\Programs\onthespot.lnk');" ^
|
||||||
|
"$Shortcut.TargetPath = $outfile;" ^
|
||||||
|
"$Shortcut.Save()"
|
||||||
|
|
||||||
|
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\onthespot" /f /v DisplayName /t REG_SZ /d "onthespot"
|
||||||
|
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Uninstall\onthespot" /f /v InstallLocation /t REG_SZ /d "%LOCALAPPDATA%\onthespot"
|
||||||
|
|
||||||
|
IF NOT "%1"=="yes" PAUSE
|
||||||
|
EXIT /B
|
Loading…
Reference in a new issue