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
24
votes
5 answers

How to uninstall Apache with command line

So I'm trying to find a command to uninstall apache from windows that I have installed earlier with an NSIS script. Basically apache is part of a package of aplications we use for our program, and when uninstalling our program we uninstall them all.…
tcardoso
  • 668
  • 3
  • 8
  • 20
23
votes
3 answers

How do i change the start in path of a shortcut for nsis?

I have an nsis installer script for the application im working on and it can place a shortcut on the desktop and in the start menu folder but each shortcut has the wrong start in path and as such the app saves data files to where the short cut is.…
Lodle
  • 31,277
  • 19
  • 64
  • 91
22
votes
2 answers

How to Add a Desktop Shortcut Option on Finish Page in NSIS installer?

I'm trying to create an installer using NSIS Modern User Interface for the first time. I would like to know how I can add an option (checkbox) for users to select to have a desktop shortcut created on the Finish Page (the last screen of the…
takoloco
  • 247
  • 1
  • 3
  • 9
21
votes
1 answer

NSIS Installer Error Flag

In some of the NSIS Installer documentation, it says that if some operation fails, the error flag will be set. Is the error flag just a boolean value or is a specific code that indicates what error occurred? If it is a code, how do I access it to…
Jeff Storey
  • 56,312
  • 72
  • 233
  • 406
21
votes
2 answers

.NET Framework 4 installation in silent mode

Can anyone explain how to make silent (without any user interface) install of .NET 4? It looks like .NET installer ignores any switches from this article and show interface always. .NET Framework 4 installer is packed by NSIS.
Paval
  • 976
  • 1
  • 11
  • 20
21
votes
1 answer

NSIS copy subfolders and files in them to install dir

With this it will copy all files from res folder, SetOutPath "$INSTDIR" File "res\" but I need to copy all subfolders and files in them. How can I achive that.
jasin_89
  • 1,993
  • 7
  • 30
  • 41
21
votes
1 answer

Changing NSIS installer properties

I have an NSIS-based installer file called setup.exe. When I go into Properties->Details, many details are missing. When I run the installer, UAC requests for elevated permissions (which is ok), but the publisher is "Unknown". How can I set these…
Eldad Mor
  • 5,405
  • 3
  • 34
  • 46
21
votes
3 answers

Execute Command-Line Command from NSIS

I'm creating my first NSI script and I'm just wondering if I can execute a command-line command from NSIS or should I just execute a batch file? I don't really know where to begin and other similar topics have gone a little over my head.
user1457296
  • 239
  • 1
  • 3
  • 8
19
votes
3 answers

Setting the UAC 'Publisher' Field for a NSIS Installer

When I open my installer(that I created using NSIS), the UAC dialog appears with information about my installer. The field Publisher is 'unknown'. I've heard of digitally signing the application, do you know how to do this in NSIS? How can I set the…
sazr
  • 24,984
  • 66
  • 194
  • 362
18
votes
2 answers

Executing Batch File in NSIS installer

I have a batch file that I need to run within my NSIS installer. It must run after all the files have been extracted, (I suppose this is obvious, otherwise the batch file wouldn't exist yet). I tried to use MUI_PAGE_CUSTOMFUNCTION_PRE with the…
Nedloh
  • 381
  • 2
  • 3
  • 14
17
votes
4 answers

Reliable way to get Windows Version from registry

I'm checking the windows version in an installer (made with NSIS) by checking the following registry key: HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion" According to this post and this page from MSDN, the currentVersion number…
skuallpa
  • 1,147
  • 3
  • 13
  • 28
17
votes
7 answers

NSIS - put EXE version into name of installer

NSIS has a Name variable that you define in the script: Name "MyApp" It defines the name of the installer, that gets displayed as the window title, etc. Is there a way to pull the .NET Version number out of my main EXE and append it to the Name? So…
codeulike
  • 22,514
  • 29
  • 120
  • 167
16
votes
1 answer

How to get command output in NSIS?

I'm wondering, how do I get the output of an execwait command in NSIS. For example, if I run tree, how would I get the output, which would be the actual tree?
noryb009
  • 548
  • 2
  • 10
  • 20
16
votes
4 answers

Methods for debugging NSIS installers?

Although NSIS allows you to build quite powerful installers, the "so low level language that it reminds me of assembly" that NSIS uses is quite prone to making mistakes and therefore, when you want your installer to do something more complex other…
Miguel Ventura
  • 10,344
  • 2
  • 31
  • 41
16
votes
3 answers

Creating a Windows installer for Python + a set of dependencies

I need to create an installer for Windows which should be able to install a specific version of the Python interpreter (2.7) plus a set a dependencies such as ipython, numpy, pandas, etc. Basically this is the same thing Active State did for their…
Giampaolo Rodolà
  • 12,488
  • 6
  • 68
  • 60