NSIS install for all users (program files), childProcess requires (spawn) run as administrator by Windows
See original GitHub issueI have created a nsis installer for my electron app using the following build:
"build": {
"appId": "my.app.id",
"asar": false,
"win": {
"icon": "icon.png",
"publisherName": "company inc"
},
"directories": {
"buildResources": "src/electron/build",
"output": "dist/electron",
"app": "src/electron"
},
"publish": {
"provider": "generic",
"url": "my url",
"channel": "latest"
},
"nsis": {
"perMachine": true,
"allowToChangeInstallationDirectory": true,
"allowElevation": true,
"oneClick": false
}
}
When I try to install, windows shows the UAC dialog, and installs the app under “Program Files” folder. When I open the app, electron window shows up and the content is just fine, however the childProcess that I create using “spawn” in the main process does NOT run unless I open the app as “administrator” once. After that all is good, any ideas?
Electron Version: 1.8.4 Electron Builder Version: 20.8.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:5
Top Results From Across the Web
Fork not working with Electron's NSIS installer
I'm running the program on Windows as administrator. The logs when running the installed app: Script to be ran: C:\Program Files\electron-app\ ...
Read more >Multi-User Header File (MultiUser.nsh)
The execution level determines the privileges of the installer application. For example, to install hardware drivers, administrator privileges are required.
Read more >gyp env: python: no such file or directory
If you're using Windows you can now install all node-gyp dependencies with single command (NOTE: Run As Admin in Windows PowerShell):.
Read more >UAC and launching an exe on Finish - NSIS Forums
Currently, when I run the exe through command line by choosing "Run as administrator", the application works fine, the web service starts ...
Read more >How to create a windows installer for an application built ...
Developers just need to provide a package for a distribution, each distribution then has a way to install this package and this way...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
But how to make app data for all users instead of user profile?
I am facing same issue. when i run the application as admin it is working fine. But when i run as non-admin user it is not working as expected. In my case it is creating folder and file in C:\Program Files (x86)\app where app folder is created. It is giving following errors Uncaught Error: EPERM: operation not permitted, open Uncaught Error: EPERM: operation not permitted, mkdir