3

We are facing issue inside non-admin user's machine at time of run update.exe using electron-updater it gives following error and does not execute:

Cannot run installer: error code: EACCES, error message: "spawn C:\Users<>\AppData\Local<>-updater\pending\update.exe EACCES", will be executed again using elevate if EACCES"

When we try to run app as "Run as Administrator" inside non-admin user's machine then it will work even though above error still occur.

Any once facing the same ? Can anyone help in this issue?

We are using electron-builder (22.14.13) and electron-updater (4.6.5) and following is our config for windows and configure auto update with GitHub release mechanism.

Below is our electron configuration to generate installer for windows.

"win": {
    "publish": [
        {
        "provider": "github",
        "owner": "Org",
        "repo": "APP_NAME",
        "token": "token",
        "private": true
        }
    ],
    "icon": "assets/icon.ico",
    "target": [
        "nsis"
    ],
    "signingHashAlgorithms": [
        "sha256"
    ],
    "publisherName": "XYZ Limited",
    "certificateFile": "build/XYZ_2020_22.pfx",
    "certificatePassword": "Password",
    "signAndEditExecutable": true,
    "requestedExecutionLevel": "highestAvailable"
},
"nsis": {
    "warningsAsErrors": false,
    "installerIcon": "assets/icon.ico",
    "runAfterFinish": true,
    "oneClick": false,
    "perMachine": true,
    "installerHeader": "assets/installerHeader.bmp",
    "installerSidebar": "build/installerSidebar.bmp",
    "createDesktopShortcut": true,
    "include": "build/installer-qa2.nsh",
    "artifactName": "${productName}.${ext}",
    "allowElevation": true
}

here i have logged same question in electron-builder foram as well.

Github foram question URL

Ken White
  • 123,280
  • 14
  • 225
  • 444
Himesh Aadeshara
  • 2,114
  • 16
  • 26

1 Answers1

1

@Anders I'd say it's directly relevant.

The error above is generated from the source file: packages/electron-updater/src/NsisUpdater.ts @line 132

Deverejones
  • 46
  • 1
  • 4