{"action":"created","issue":{"url":"https://api.github.com/repos/electron-userland/electron-builder/issues/924","repository_url":"https://api.github.com/repos/electron-userland/electron-builder","labels_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/924/labels{/name}","comments_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/924/comments","events_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/924/events","html_url":"https://github.com/electron-userland/electron-builder/issues/924","id":190425822,"number":924,"title":"NSIS does not complete installation when allowElevation is true","user":{"login":"aesalazar","id":3759332,"avatar_url":"https://avatars.githubusercontent.com/u/3759332?v=3","gravatar_id":"","url":"https://api.github.com/users/aesalazar","html_url":"https://github.com/aesalazar","followers_url":"https://api.github.com/users/aesalazar/followers","following_url":"https://api.github.com/users/aesalazar/following{/other_user}","gists_url":"https://api.github.com/users/aesalazar/gists{/gist_id}","starred_url":"https://api.github.com/users/aesalazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aesalazar/subscriptions","organizations_url":"https://api.github.com/users/aesalazar/orgs","repos_url":"https://api.github.com/users/aesalazar/repos","events_url":"https://api.github.com/users/aesalazar/events{/privacy}","received_events_url":"https://api.github.com/users/aesalazar/received_events","type":"User","site_admin":false},"labels":[{"id":214243368,"url":"https://api.github.com/repos/electron-userland/electron-builder/labels/duplicate","name":"duplicate","color":"cccccc","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-18T21:27:22Z","updated_at":"2016-11-19T15:15:57Z","closed_at":"2016-11-19T14:41:58Z","body":"<!-- Which version of electron-builder are you using? -->\r\n* **Version**:  8.7.0\r\n\r\n<!-- What target are you building for? -->\r\n* **Target**:  NSIS for Windows on a Windows 10 Machine with latest updates.\r\n\r\n<!-- Enter your issue details below this comment. -->\r\n\r\nCan it be confirmed that allowElevation works when oneClick is set to false?  I have been struggling with this for a little while and thought it might just be something with the way I was building.  But I have seen it on multiple systems and multiple project. \r\n\r\nI have a package.json file with this for the build section:\r\n\r\n```\r\n  \"build\": {\r\n    \"appId\": \"ernie.salazar.electronsandbox\",\r\n    \"category\": \"develope.ernie.salazar.sandbox\",\r\n    \"nsis\": {\r\n      \"oneClick\": false,\r\n      \"allowElevation\": true\r\n    }\r\n  }\r\n```\r\n\r\nI have oneClick turned off because I would like the user to be able to install for just them OR the entire machine (\"Anyone\").  In order to do a global install you obviously need admin rights which it can obtain during installation when UAC prompts.\r\n\r\nHere is where I run into issues.  With several apps I have tried on they install fine for the user but the global install almost always fails right after hitting \"Yes\" when prompted by UAC.  On one machine it has a popup message saying \"Error decompressing data!  Corrupted installer?\".  But on others it just keeps going and as though it completed with the option to Run after closing the installer checked.  It does not run the program however.  Funny thing is if I try running the installer few more time it will eventually work.  \r\n\r\nIt seems to create the c:\\program files\\ folder and even copy the files.  It fails to create the icons. and add an entry to Add/Remove programs.  And if I try to manually run the exe in program files folder it gives an error about node.dll is bad.\r\n\r\nNow, the kicker is, if I right-click the same setup.exe and \"Run as Administrator\" (after cleaning out the program files folder) it all works just fine.  So I can only concluded that it is a problem with allowing the elevated privileges with the installation exe already running.\r\n\r\nI can set allowElevation to false which will force the user to Run as Admin but most would not know to do that.  It would be great to get it all working as it should.\r\n\r\nThanks for any help.  I created a branch that you can test this out on:\r\n\r\nhttps://github.com/aesalazar/ElectronSandbox/tree/electron-builder\r\n\r\nThanks\r\nErnie"},"comment":{"url":"https://api.github.com/repos/electron-userland/electron-builder/issues/comments/261719557","html_url":"https://github.com/electron-userland/electron-builder/issues/924#issuecomment-261719557","issue_url":"https://api.github.com/repos/electron-userland/electron-builder/issues/924","id":261719557,"user":{"login":"aesalazar","id":3759332,"avatar_url":"https://avatars.githubusercontent.com/u/3759332?v=3","gravatar_id":"","url":"https://api.github.com/users/aesalazar","html_url":"https://github.com/aesalazar","followers_url":"https://api.github.com/users/aesalazar/followers","following_url":"https://api.github.com/users/aesalazar/following{/other_user}","gists_url":"https://api.github.com/users/aesalazar/gists{/gist_id}","starred_url":"https://api.github.com/users/aesalazar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aesalazar/subscriptions","organizations_url":"https://api.github.com/users/aesalazar/orgs","repos_url":"https://api.github.com/users/aesalazar/repos","events_url":"https://api.github.com/users/aesalazar/events{/privacy}","received_events_url":"https://api.github.com/users/aesalazar/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T15:15:57Z","updated_at":"2016-11-19T15:15:57Z","body":"No problem, thanks for all the effort you have done so far!"}}
{"actor":{"display_login":"aesalazar"}}