Questions tagged [nsis]

This tag is used for questions about the open source Nullsoft Scriptable Install System (NSIS) setup generator.

Details

Being a user's first experience with your product, a stable and reliable installer is an important component of succesful software. With NSIS you can create such installers that are capable of doing everything that is needed to setup your software.

NSIS is script-based and allows you to create the logic to handle even the most complex installation tasks. Many plug-ins and scripts are already available: you can create web installers, communicate with Windows and other software components, install or update shared components and more

Getting Started

IDE

Plugins

NSIS comes with a variety of plugins

Plugins are usually one .dll file and an .nsh file. To Install Plugins you need to copy the dll to C:\Program Files\NSIS\Plugins and the nsh file to C:\Program Files\NSIS\Include
See : How do I install a Plugin

Useful Plugins

Tips

  1. You can use the the LogicLib which comes as part of the installation to use if conditions in your script (this is not directly available). All you need to do is:

    !include 'LogicLib.nsh'
    

    And then:

    # ...
    ${If} $0 == "hello"
        DetailPrint "world"
    ${Endif}
    

    See this for details.

2580 questions
15
votes
2 answers

How to run exe files in NSIS Script?

In InnoSetup, there is a part called run which will execute the exe, batch file and msi. We can also give command line parameters to this run. I provide the Innosetup sample: [Run] Filename: "{app}\msdirent.exe "; Filename: "msiexec.exe";…
karthik
  • 17,453
  • 70
  • 78
  • 122
15
votes
3 answers

How can I get NSIS to install and execute files from a temp directory?

I'm using the following NSIS script: Name "My app wrapper" Outfile "MyAppSetup.exe" InstallDir $TEMP\MyApp\Install Function .onInit SetSilent silent FunctionEnd Section "" SetOutPath $TEMP\MyApp\Install File installer.msi File setup.exe …
Mike Pateras
  • 14,715
  • 30
  • 97
  • 137
15
votes
6 answers

NSIS installer that checks for .NET Framework

I want to create an NSIS installer that checks for the .NET Framework and installs it if it's not there. Can you point me to a script for this? I'm very new to NSIS.
omgwtfbbq
  • 151
  • 1
  • 1
  • 4
14
votes
6 answers

How do you make an update installer with NSIS?

I currently have a project with an installer I made with NSIS, but I would like to have an update to new versions that only has the changed files and will show a changelog. The target platform is windows. What methods/suggestions do you have to do…
staackuser2
  • 12,172
  • 4
  • 42
  • 40
14
votes
1 answer

How do you request administrator permissions using NSIS?

I am quite new with NSIS. I am trying to request administrator permissions in order to run the installer, as it messes around a bit with registries. My problem with "RequestExecutionLevel" and "MULTIUSER_EXECUTIONLEVEL" is that they both absolutely…
Amit Dvir
  • 337
  • 1
  • 3
  • 9
14
votes
1 answer

7998: ANSI targets are deprecated

How can I resolve "7998: ANSI targets are deprecated"? When I add Unicode True I get error, Error: Can't change target charset after data already got compressed or header already changed! Error in script -- on line 58 -- aborting creation…
Yogesh
  • 155
  • 1
  • 9
14
votes
2 answers

How can I modify the text in the MUI_WELCOME_PAGE when using MUI2 for NSIS?

I want to add a label displaying the full version-string in the welcome screen in the installer I am creating using NSIS with MUI2. I have searched for info on how to do this, but only found references to using MUI_INSTALLOPTIONS* which I found ws…
Spiralis
  • 3,232
  • 2
  • 39
  • 53
14
votes
5 answers

How do I create a shortcut (.lnk) with a relative target?

I have an executable on my disk-on-key in dir\program\prog.exe I'd like to have a shortcut to the executable on the DoK's root directory, that is, prog.lnk would refer to dir\program\prog.exe. However, it seems that prog.lnk can't have a relative…
ronys
  • 508
  • 1
  • 6
  • 9
14
votes
2 answers

What are ProductCode & UpgradeCode & GUID? How to detect if certain application/library is already installed on the user machine?

I've already gone through: Check if the application is already installed Detecting if a program is already installed with NSIS http://nsis.sourceforge.net/Add_uninstall_information_to_Add/Remove_Programs My questions are little more in depth and…
claws
  • 52,236
  • 58
  • 146
  • 195
14
votes
4 answers

NSIS support for Linux and Solaris

Does NSIS support Linux and Solaris? I read somewhere that we can compile nsis script on Linux but cant execute the .exe generated on any other platforms but Windows. Can somebody put more light in this?
Pia
  • 463
  • 2
  • 9
  • 20
14
votes
3 answers

Use one NSIS installer to install 32-bit binaries on 32-bit OS and 64-bit binaries on 64-bit OS possible?

I currently have two WIX installers for a product that I maintain. One for 32-bit operating systems, and one for 64-bit operating systems. Instead of maintaining two separate installers, I want to combine them into one NSIS installer that can…
Julian Easterling
  • 830
  • 1
  • 10
  • 21
13
votes
1 answer

NSIS How to split strings over multiple lines?

Seems like a simple one, but I have a large command line help string and would like to break it up so it's easier to read/maintain. How can I do this in NSIS? The normal "xxx" \ "xxxx" style method of doing this doesn't seem to work. Example code I…
Jesse
  • 165
  • 3
  • 7
13
votes
4 answers

Detecting if a program is already installed with NSIS

I'm using NSIS to create an installer for a program, what is the best way to detect if this program is already installed? Also, since I'm running the installer from the autorun.inf, can I immediately quit the installer if it locates an installed…
Abdullah Jibaly
  • 53,220
  • 42
  • 124
  • 197
13
votes
5 answers

Update %PATH% environment variable using NSIS

I've read that "Strings longer than ${NSIS_MAX_STRLEN} (1024) will get truncated/corrupted." How can I safely update %PATH% environment variable?
Cyber Tailor
  • 443
  • 7
  • 18
13
votes
6 answers

Check for .NET4.5+ with NSIS

All, I am aware of the following methods to check the framework version in NSIS. For .NET4.0+ I currently use Function IsDotNetInstalled StrCpy $0 "0" StrCpy $1 "SOFTWARE\Microsoft\.NETFramework" ; Registry entry to look in. StrCpy $2…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277