Reputation: 96
I'm building an Electron app using electron-builder. The build process produces a setup.exe file, but when I launch the setup process, the installer gets to around 50% completion and then exits.
The only file that is in the installation directory,%USERPROFILE%\AppData\Local\Programs\Application-Name
, after running setup is the uninstaller.exe file.
The Mac version installs successfully, and the unpacked EXE file works as expected on Windows.
I have tried this on Windows 7 and Windows 8 with the same results. I have also tried setting the oneClick
property to true and false without any success with either option.
{
"name": "Application-Name",
"author": "Company",
"description": "Publication Archive",
"version": "0.1.0",
"private": true,
"homepage": "./",
"main": "./src/electron.js",
"dependencies": {
"connected-react-router": "^6.5.0",
"history": "^4.9.0",
"node-sass": "^4.12.0",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-redux": "^7.1.0",
"react-router-dom": "^5.0.1",
"react-scripts": "3.0.1",
"redux": "^4.0.2",
"redux-thunk": "^2.3.0",
"sqlite3": "^4.0.9"
},
"scripts": {
"preelectron-pack:win": "npm run build && cp ./src/db.js ./build/db.js && cp ./src/electron.js ./build/electron.js",
"electron-pack:win": "cross-env DEBUG=electron-builder build --win"
},
"build": {
"appId": "com.electron.application-name",
"directories": {
"buildResources": "icons",
"output": "release-builds"
},
"win": {
"target": [
{
"target": "nsis",
"arch": [
"x64"
]
}
],
"icon": "icons/winapp.png"
},
"nsis": {
"oneClick": false,
"deleteAppDataOnUninstall": false
},
"files": [
"build/**/*",
"node_modules/**/*",
"db/**/*",
"public/**/*"
]
},
"devDependencies": {
"cross-env": "^5.2.0",
"devtron": "^1.4.0",
"electron": "^5.0.6",
"electron-builder": "^20.44.4",
"electron-devtools-installer": "^2.2.4",
"typescript": "^3.5.3"
}
}
Installer log file contents:
=== Verbose logging started: 7/9/2019 13:50:53 Build type: SHIP UNICODE 5.00.7601.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (18:B0) [13:50:53:991]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (18:B0) [13:50:53:991]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (18:98) [13:50:54:030]: Resetting cached policy values
MSI (c) (18:98) [13:50:54:030]: Machine policy value 'Debug' is 0
MSI (c) (18:98) [13:50:54:030]: ******* RunEngine:
******* Product: Application-Name Setup 0.1.0.exe
******* Action:
******* CommandLine: **********
MSI (c) (18:98) [13:50:54:033]: Note: 1: 2203 2: Application-Name Setup 0.1.0.exe 3: -2147286960
MSI (c) (18:98) [13:50:54:034]: MainEngineThread is returning 1620
=== Verbose logging stopped: 7/9/2019 13:50:54 ===
I expect that the result of running the installer would be that the application is installed in the default location or that there would be a more helpful error message, but I can't seem to find the right combo of options to make this work.
Upvotes: 1
Views: 2417
Reputation: 11
I was in the same situation. New installation is now possible by manually removing the application. You can remove applications from Control Panel> Programs> Uninstall a program.
Upvotes: 1