From 4ac12bfcee647e7847549ac2fac6960ced92e6d3 Mon Sep 17 00:00:00 2001 From: develar Date: Wed, 2 Nov 2016 08:11:07 +0100 Subject: [PATCH] fix(nsis): machine-wide one-click NSIS installer launches application as administrator Closes #864 --- appveyor.yml | 2 -- src/targets/nsis.ts | 4 ++-- templates/nsis/oneClick.nsh | 4 ++-- test/src/nsisTest.ts | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1df07974ae9..903913fb726 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,8 +7,6 @@ cache: install: - ps: Install-Product node 6 x64 - - choco install -i yarn - - refreshenv # unknown yarn error - npm install - npm prune diff --git a/src/targets/nsis.ts b/src/targets/nsis.ts index d252b42939c..a684d63d464 100644 --- a/src/targets/nsis.ts +++ b/src/targets/nsis.ts @@ -15,9 +15,9 @@ import { PublishConfiguration, GenericServerOptions, UpdateInfo } from "../optio import { safeDump } from "js-yaml" import { createHash } from "crypto" -const NSIS_VERSION = "3.0.1" +const NSIS_VERSION = "3.0.2" //noinspection SpellCheckingInspection -const NSIS_SHA2 = "23280f66c07c923da6f29a3c318377720c8ecd7af4de3755256d1ecf60d07f74" +const NSIS_SHA2 = "012c29d62e167ff74e858eeb929641dc2c9d7bfe7465e748648814660c61b419" //noinspection SpellCheckingInspection const ELECTRON_BUILDER_NS_UUID = "50e065bc-3134-11e6-9bab-38c9862bdaf3" diff --git a/templates/nsis/oneClick.nsh b/templates/nsis/oneClick.nsh index ffc04890666..76c8b42de66 100644 --- a/templates/nsis/oneClick.nsh +++ b/templates/nsis/oneClick.nsh @@ -2,8 +2,8 @@ !ifndef BUILD_UNINSTALLER Function StartApp !ifdef INSTALL_MODE_PER_ALL_USERS - !include UAC.nsh - !insertmacro UAC_AsUser_ExecShell "" "$SMPROGRAMS\${PRODUCT_FILENAME}.lnk" "" "" "" + !include StdUtils.nsh + ${StdUtils.ExecShellAsUser} $0 "$SMPROGRAMS\${PRODUCT_FILENAME}.lnk" "open" "" !else ExecShell "" "$SMPROGRAMS\${PRODUCT_FILENAME}.lnk" !endif diff --git a/test/src/nsisTest.ts b/test/src/nsisTest.ts index 0706e00f98d..6202d175fa9 100644 --- a/test/src/nsisTest.ts +++ b/test/src/nsisTest.ts @@ -58,7 +58,7 @@ test.ifDevOrLinuxCi("perMachine, no run after finish", app({ }, publish: { provider: "generic", - url: "https://develar.s3-website.eu-central-1.amazonaws.com/test", + url: "https://develar.s3.amazonaws.com/test", }, } }, @@ -75,7 +75,7 @@ test.ifDevOrLinuxCi("perMachine, no run after finish", app({ const updateInfo = safeLoad(await readFile(path.join(context.outDir, "latest.yml"), "utf-8")) assertThat(updateInfo).hasProperties({ version: "1.1.0", - file: "TestApp Setup 1.1.0.exe", + path: "TestApp Setup 1.1.0.exe", }) assertThat(updateInfo.sha2).isNotEmpty() await doTest(context.outDir, false)