The use of software packaging NSIs

Source: Internet
Author: User

About NSIs

1, NSIs Introduction

(1) What is NSIs?

A free Win32 installation, uninstall system!

(2) What are the characteristics of NSIs?

The script is simple and efficient, the system overhead is small, installs, uninstalls, sets up, extracts the file to be able to do nothing, almost can do all things.

2. Tools

NSIS Edit + NSIS

3. How to use

Script Wizard + Modify code = Personalize the installation package

Preparing files

Here are all the files I will be packaging, the installation package directory structure (including: executable program, plug-in library, run-time library, authorization file, uninstall program icon and so on!). ) as shown: (omitted)


Depending on the wizard, you can generate a script, save and compile to package the build installation package! Very convenient.

Specific changes to the method of self-inspection, here is not introduced.



Here is a concise version of the footsteps, with the installation and the complete Uninstall function Example:

; author: tinyms;date: 2011-06-22;usage: replace nsis/contrib/zip2exe/modern.nsh; requestexecutionlevel none|user|highest|admin ; requestexecutionlevel user !include  "Mui.nsh"!insertmacro mui_page_directory!insertmacro  MUI_PAGE_INSTFILES!insertmacro MUI_LANGUAGE  "Simpchinese"  !define NAME  "Your EXE name" "Modify your own installation package icoicon " D:/logo.ico " Section    SetOutPath  $INSTDIR \${name}\ bin        ; the shortcut to modify your EXE location to point to     createshortcut   $DESKTOP \${name}.lnk  $INSTDIR \${name}\bin\${name}.exe    setshellvarcontext  All        ; Modify the shortcut of your EXE location to point to      createshortcut  $SMPROGRAMS \${name}.lnk  $INSTDIR \${name}\bin\${name}.exe     writeregstr hklm  "Software\${name}"   "" " " $INSTDIR "        ; can have delete item in Control Panel     WriteRegStr HKLM  "Software\microsoft\windows\ Currentversion\uninstall\${name} " " DisplayName " " ${name} "    WriteRegStr  hklm  "Software\microsoft\windows\currentversion\uninstall\${name}"   "UninstallString"   "$INSTDIR \${name}\uninst.exe "'     WriteUninstaller " $INSTDIR \${name}\uninst.exe "sectionend  Section  "Uninstall"     Delete  $DESKTOP \${name}.lnk     setshellvarcontext all    delete  $SMPROGRAMS \${name}.lnk     deleteregkey hklm  "Software\${name}"     DeleteRegKey HKLM  "software\ Microsoft\windows\currentversion\uninstall\${name} "    RMDir /r " $INSTDIR " Sectionend


The use of software packaging NSIs

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.