Browse Source

quickinstall: deal with paths better

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
master
Jason A. Donenfeld 4 years ago
parent
commit
51069bae64
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      quickinstall.bat

+ 6
- 7
quickinstall.bat View File

@@ -1,17 +1,16 @@
@echo off
rem SPDX-License-Identifier: MIT
rem rem Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
rem Copyright (C) 2019 WireGuard LLC. All Rights Reserved.

setlocal
cd /d %~dp0 || exit /b 1
echo [+] Building wireguard.exe
call .\build.bat || exit /b 1
echo [+] Building installer
cd .\installer
call .\build.bat || exit /b 1
call .\installer\build.bat || exit /b 1
echo [+] Uninstalling old versions
for /f %%a in ('reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall /s /d /c /e /f WireGuard ^| findstr CurrentVersion\Uninstall') do msiexec /qb /x %%~na
echo [+] Installing new version
for /f "tokens=3" %%a in ('findstr /r "WIREGUARD_WINDOWS_VERSION_STRING.*[0-9.]*" ..\version.h') do set WIREGUARD_VERSION=%%a
for /f "tokens=3" %%a in ('findstr /r "WIREGUARD_WINDOWS_VERSION_STRING.*[0-9.]*" .\version.h') do set WIREGUARD_VERSION=%%a
set WIREGUARD_VERSION=%WIREGUARD_VERSION:"=%
cd .\dist
msiexec /qb /i wireguard-amd64-%WIREGUARD_VERSION%.msi
cd ..\..
msiexec /qb /i installer\dist\wireguard-%PROCESSOR_ARCHITECTURE%-%WIREGUARD_VERSION%.msi

Loading…
Cancel
Save