aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/installer (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fetcher: delay load anything with transitive dependencies outside of knowndllsJason A. Donenfeld2020-11-272-1/+4
| | | | | | | | | | | | | | | | It looks like advapi32.dll loads cryptbase.dll because RtlGenRandom is forwarded to it, and cryptbase.dll isn't in knowndlls. So, even though we haven't done anything wrong by importing advapi32.dll statically, the surprising forwarding behavior means that this is a disaster. At the same time, some UI-related system modules wind up calling loadlibraryex with default arguments, so again, even though linking to things like user32.dll and such statically is fine, microsoft is doing the wrong thing inside of them. Work around the first issue by loading advapi32.dll (and others, just for good measure) delayed, and work around the latter by gimping the dll search path. Reported-by: Stefan Kanthak <stefan.kanthak@nexgo.de> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: use formally verified cryptoJason A. Donenfeld2020-11-273-1042/+2257
| | | | | | Cleaner, better vetted, faster. Based on fiat. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update headersJason A. Donenfeld2020-11-223-3/+3
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: remove admin knobs in cleanupJason A. Donenfeld2020-11-221-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: force modal if KB2921916 is missingJason A. Donenfeld2020-11-221-7/+19
| | | | | | | | This goes against user choice, but it's also required to get Windows 7 users upgrading again. Reported-by: /u/tarakan1983 on Reddit Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: remove memmemJason A. Donenfeld2020-11-201-116/+8
| | | | | | | There's only one 'h' in the search string, so the efficiency is about the same. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: regard KB2921916 exits when prompted to be USEREXIT so fetcher doesn't mindJason A. Donenfeld2020-11-181-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: check for KB2921916's setupapi.dll directlyJason A. Donenfeld2020-11-181-23/+144
| | | | | | | Some people might have the right setupapi.dll without actually having installed the quickfix. Search for a distinguishing feature instead. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: refactor custom actions to appear in chronological orderSimon Rozman2020-11-182-209/+209
| | | | | | ...in the source code. Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: prevent the process killing on upgrade cleanupSimon Rozman2020-11-181-7/+13
| | | | | | | When MSI is upgrading previous version, the RemoveExistingProducts shouldn't kill our processes we just installed and started. Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: ignore remove failuresSimon Rozman2020-11-181-1/+2
| | | | | | | | | | On upgrades from <=0.1.1 there's a short window, where new tunnel service may delete the Wintun 0.8 driver from the store, while 0.1.1 removal is about to do the same, and fails with "File not found". The computer ended up with the old WireGuard installed. Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: disable ROLLBACKJason A. Donenfeld2020-11-171-0/+1
| | | | | | This causes more problems than it solves. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: styleJason A. Donenfeld2020-11-171-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: do not append .msi to random filenameJason A. Donenfeld2020-11-171-2/+1
| | | | | | It's actually not required, and we don't do it in updater. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: check WinVerifyTrust before executionJason A. Donenfeld2020-11-172-5/+21
| | | | | | | | | | Our YubiHSM signature is much stronger than the junky authenticode one, but still, it can't hurt. This also hedges against anti-virus in the event that we forget to sign it -- A/V will inspect whatever code the fetcher executes, and so we only want to execute authenticode-signed MSIs, to avoid training their heuristics. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* fetcher: user exit is not a real errorJason A. Donenfeld2020-11-161-0/+1
| | | | | | | This is returned by our custom action's method to launch wireguard and abort. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: launch GUI before attempting a reinstallSimon Rozman2020-11-162-8/+34
| | | | | | | | | | | | | With the recently introduced wireguard-installer.exe an issue in MSI internal caching appeared. With the temporary MSI file used at install time gone, the MSI was unable to load our custom actions in the reinstall attempt. Rather than attempting to reinstall the product and fail, the MSI was upgraded to launch GUI early in the reinstall attempt and cancel the execute sequence then. Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: add missing thread handle closeSimon Rozman2020-11-161-0/+1
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* fetcher: introduce downloader utilityJason A. Donenfeld2020-11-1614-0/+2024
| | | | | | This seems easier than having to juggle 4 different architectures. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: always pass program files via propertyJason A. Donenfeld2020-11-161-45/+30
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: use new path for wg.exeJason A. Donenfeld2020-11-161-3/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: do not check for Wow64 and KB when removingJason A. Donenfeld2020-11-161-2/+2
| | | | | | We want removal to be as frictionless as possible. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: require KB2921916 on Windows 7Jason A. Donenfeld2020-11-163-1/+71
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: prohibit Wow64 installsJason A. Donenfeld2020-11-162-1/+53
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: suppress ice03 errorsJason A. Donenfeld2020-11-131-0/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: clean-up adapters and Wintun driver on uninstallSimon Rozman2020-11-132-1/+137
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: updater: introduce ARM64 MSI packagesSimon Rozman2020-11-133-2/+6
| | | | | | Windows 10 ARM64 refuses to install ARM MSI. Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: enable ARM MSI buildingSimon Rozman2020-11-133-4/+9
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* build: remove cgoJason A. Donenfeld2020-11-131-1/+0
| | | | | | This doesn't yet build but we'll get there. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: move wg.exe to C:\Program Files\WireGuardSimon Rozman2020-11-132-14/+3
| | | | | | ...and append C:\Program Files\WireGuard to the path. Signed-off-by: Simon Rozman <simon@rozman.si>
* build: switch to using llvm compilerJason A. Donenfeld2020-11-131-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* version: make native GoSimon Rozman2020-11-131-1/+1
| | | | | | | Arm has no CGo support. Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* wintun: move to RCDATA resourceSimon Rozman2020-11-132-13/+0
| | | | | Signed-off-by: Simon Rozman <simon@rozman.si> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: bump wintun to 0.8.1Jason A. Donenfeld2020-03-011-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: bump wintun versionJason A. Donenfeld2019-12-111-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: use newer 3.11 stable branch of WiXJason A. Donenfeld2019-12-111-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* instaler: add tsaware, dep, and high entropy aslr to installerJason A. Donenfeld2019-10-261-3/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: bump wintunJason A. Donenfeld2019-10-071-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: update path to versionJason A. Donenfeld2019-09-011-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: make the two types of post-install execution mutually exclusiveJason A. Donenfeld2019-08-171-2/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: tame restart managerJason A. Donenfeld2019-08-171-0/+2
| | | | | | This prevents the dialog box from showing. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: kill leftover processes forciblyJason A. Donenfeld2019-08-173-2/+107
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* installer: hardcode %ProgramFiles%\WireGuard install folderSimon Rozman2019-08-161-20/+5
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: clean up logicJason A. Donenfeld2019-08-122-247/+119
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* build: fix batch file status returningSimon Rozman2019-08-121-4/+4
| | | | | | | | | | | | | Apparently, exit /b works only halfway in Windows 8 and later. The %errorlevel% is correct after batch exits, but && and || do not honor it. The `cmd /c exit` doesn't actually quit the batch processing, therefore it must be at the very end of the batch file. Even `goto :eof` resets the return status for && and ||. Source: https://www.computerhope.com/forum/index.php/topic,65815.msg920454.html#msg920454 Signed-off-by: Simon Rozman <simon@rozman.si>
* build: use setlocal to keep build environment localSimon Rozman2019-08-121-13/+8
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: port custom actions from JScript to CSimon Rozman2019-08-094-108/+419
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: unify WIREGUARD_-specific WiX variablesSimon Rozman2019-08-072-9/+9
| | | | Signed-off-by: Simon Rozman <simon@rozman.si>
* build: support building from arbitrary folderSimon Rozman2019-08-071-4/+5
| | | | | | | | The :installdeps used .deps folder in the current working folder, while build failed expecting to find sources in the current working folder as well. Signed-off-by: Simon Rozman <simon@rozman.si>
* installer: raise UI on MSI relaunch and add DO_NOT_LAUNCH overrideSimon Rozman2019-08-051-2/+9
| | | | | | | | | | Clicking on the MSI of an already installed WireGuard launches/raises WireGuard UI now. WireGuard UI launching can now also be disabled by invoking: `msiexec /i wireguard...msi DO_NOT_LAUNCH=1` Signed-off-by: Simon Rozman <simon@rozman.si>