NSIs Package folder Permissions---AccessControl

Source: Internet
Author: User
Tags file copy

Before the PC developed with electron, electron-packager the project into an executable file and then packaged it with Grunt-electron-installer to install EXE files. The most uncomfortable is that the installation does not have a custom directory, the default is installed on the C drive, and sometimes reported installation errors (installation has failed).

Grunt-electron-installer provides a configuration-style interface, and it is impossible to solve these installation problems. Have met this and solved the classmate welcome message.

At last, the production program NSIs with strong operability is chosen:

Process or the same as before package the project first

Electron-packager NPM Address: Https://www.npmjs.com/package/electron-packager

Then install NSIs and Nisedit

Open Nisedit, File-"New Footsteps" (wizard)

Create a script as prompted--reference

A heap of scripts will be generated upon completion

Click Compile

The final one will come up with an installation package.

However...

Click Install Package---"Installation Successful---" Use error

。。。。

The reason is that some logic in the project has local file operations, permissions problems caused the operation failed, error.

Continue Google ...

Found AccessControl.

Official address: http://nsis.sourceforge.net/AccessControl_plug-in

Install this plugin first

Find the NSIs installation directory, the compression package corresponding to the file copy in the installation.

Then, go back to Nisedit and use it when copying folders

Setoutpath "$INSTDIR \resources\app"  File ". \.. \.. \dapp\homecloud\out-dev\homecloud-win32-x64\resources\app\license.txt "  File": \.. \.. \dapp\homecloud\out-dev\homecloud-win32-x64\resources\app\logo-16.ico "  File": \.. \.. \dapp\homecloud\out-dev\homecloud-win32-x64\resources\app\logo.ico "  File": \.. \.. \dapp\homecloud\out-dev\homecloud-win32-x64\resources\app\main.js "  ; set permissions------  AccessControl:: Grantonfile     "$INSTDIR \resources\app" "(BU)" "Genericread + genericwrite"  Pop $

It means to set all the files under the app to be read and write.

Then compile the script again.

Done......

NSIs Package folder Permissions---AccessControl

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.