Skip to content

Commit 4ac12bf

Browse files
committed
fix(nsis): machine-wide one-click NSIS installer launches application as administrator
Closes #864
1 parent bc64791 commit 4ac12bf

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ cache:
77

88
install:
99
- ps: Install-Product node 6 x64
10-
- choco install -i yarn
11-
- refreshenv
1210
# unknown yarn error
1311
- npm install
1412
- npm prune

src/targets/nsis.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import { PublishConfiguration, GenericServerOptions, UpdateInfo } from "../optio
1515
import { safeDump } from "js-yaml"
1616
import { createHash } from "crypto"
1717

18-
const NSIS_VERSION = "3.0.1"
18+
const NSIS_VERSION = "3.0.2"
1919
//noinspection SpellCheckingInspection
20-
const NSIS_SHA2 = "23280f66c07c923da6f29a3c318377720c8ecd7af4de3755256d1ecf60d07f74"
20+
const NSIS_SHA2 = "012c29d62e167ff74e858eeb929641dc2c9d7bfe7465e748648814660c61b419"
2121

2222
//noinspection SpellCheckingInspection
2323
const ELECTRON_BUILDER_NS_UUID = "50e065bc-3134-11e6-9bab-38c9862bdaf3"

templates/nsis/oneClick.nsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
!ifndef BUILD_UNINSTALLER
33
Function StartApp
44
!ifdef INSTALL_MODE_PER_ALL_USERS
5-
!include UAC.nsh
6-
!insertmacro UAC_AsUser_ExecShell "" "$SMPROGRAMS\${PRODUCT_FILENAME}.lnk" "" "" ""
5+
!include StdUtils.nsh
6+
${StdUtils.ExecShellAsUser} $0 "$SMPROGRAMS\${PRODUCT_FILENAME}.lnk" "open" ""
77
!else
88
ExecShell "" "$SMPROGRAMS\${PRODUCT_FILENAME}.lnk"
99
!endif

test/src/nsisTest.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ test.ifDevOrLinuxCi("perMachine, no run after finish", app({
5858
},
5959
publish: {
6060
provider: "generic",
61-
url: "https://develar.s3-website.eu-central-1.amazonaws.com/test",
61+
url: "https://develar.s3.amazonaws.com/test",
6262
},
6363
}
6464
},
@@ -75,7 +75,7 @@ test.ifDevOrLinuxCi("perMachine, no run after finish", app({
7575
const updateInfo = safeLoad(await readFile(path.join(context.outDir, "latest.yml"), "utf-8"))
7676
assertThat(updateInfo).hasProperties({
7777
version: "1.1.0",
78-
file: "TestApp Setup 1.1.0.exe",
78+
path: "TestApp Setup 1.1.0.exe",
7979
})
8080
assertThat(updateInfo.sha2).isNotEmpty()
8181
await doTest(context.outDir, false)

0 commit comments

Comments
 (0)