Skip to content

Commit

Permalink
fix(nsis): machine-wide one-click NSIS installer launches application…
Browse files Browse the repository at this point in the history
… as administrator

Closes #864
  • Loading branch information
develar committed Nov 2, 2016
1 parent bc64791 commit 4ac12bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ cache:

install:
- ps: Install-Product node 6 x64
- choco install -i yarn
- refreshenv
# unknown yarn error
- npm install
- npm prune
Expand Down
4 changes: 2 additions & 2 deletions src/targets/nsis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions templates/nsis/oneClick.nsh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/src/nsisTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
}
},
Expand All @@ -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)
Expand Down

0 comments on commit 4ac12bf

Please sign in to comment.