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
8
votes
3 answers

How to install application as windows service using NSIS script

How to install application as windows service using NSIS script? I used this command in the script Exec '"sc.exe" but after installation i couldn't find any service in windows services related to it so help me thanks.
Sujeeth Damodharan
  • 477
  • 2
  • 7
  • 16
8
votes
2 answers

How to pass file content as a command argument in Windows cmd?

I want to do something like bash kill -9 `cat pid.txt` in Windows. I tried set /p mypid= < pid.txt && taskkill /f /pid %mypid% but it doesn't work, looks like %mypid% becomes assigned after executing of taskkill. How to do it? (I'm going to call…
user1569115
8
votes
7 answers

Missing welcome image in NSIS/MUI2

I'm struggling to add an image to the first page of an installer written with NSIS/MUI2. Here's a trimmed down version of the code I'm using. !include "MUI2.nsh" !define MUI_HEADERIMAGE !define MUI_HEADERIMAGE_BITMAP nsis-header.bmp !define…
Xr.
  • 1,410
  • 13
  • 23
7
votes
2 answers

Automatically retrieve EXE file version to embed in NSIS installer metadata

I am attempting to remove one more step in my application's release process by automatically retrieving versioning info from my executable (in this case, a .NET application). Up to this point, I have been able to get by with a limited knowledge of…
user664939
  • 1,977
  • 2
  • 20
  • 35
7
votes
2 answers

NSIS - Desktop Shortcut For All Users

How can I create desktop shortcuts for all user while installing a package?
vijay
  • 679
  • 2
  • 7
  • 15
7
votes
4 answers

Is it possible to call Ant or NSIS scripts from Java code?

Is it possible to call Ant or NSIS scripts programmatically from Java code at runtime? If so, how?
Aerrow
  • 12,086
  • 10
  • 56
  • 90
7
votes
1 answer

NSIS Installer not writing Registry Entries

I am attempting to debug the NSIS installer for QGIS (which is not removing registry entries upon uninstall). I've created a simple test installer to speed up the process. My test installer is not writing registry entries. I can't see what I'm…
siliconsmiley
  • 339
  • 2
  • 10
7
votes
1 answer

NSIS Installer Name

Is it possible to set the nsis installer file generated when compiling the installer? something like: makensis /ExeFile:myInstall-v4.1.2.3.exe install.nsi That would be keen.
James Thigpen
  • 869
  • 1
  • 9
  • 25
7
votes
2 answers

How to launch a program as as a normal user from a UAC elevated installer

I'm writing an NSIS installer and the setup program elevates "as administrator" as needed on Windows 7 / vista. I need to run the installed program at the end of the install and don't want to launch it with the same privileges as the installer. The…
KZ.
  • 132
  • 2
  • 7
7
votes
4 answers

Retain data on custom pages when back button is pressed

Incase of custom pages in NSIS script is there any way to retain the data entered by user when back button is pressed (when the installer is running)?
Pia
  • 463
  • 2
  • 9
  • 20
7
votes
1 answer

How do I detect silent install?

If an NullSoft Install System installer is launched with the /S switch, how can I detect it from the script?
joelsand
  • 2,245
  • 2
  • 21
  • 31
7
votes
2 answers

How to install AccessControl NSIS plugin? and grant full access to a subfolder?

I am doing what it says on the forum but can't figure out where is the problem. I downloaded the .zip and extracted it. There was 4 folders (Contrib,Docs,Plugins,Unicode) aside from Docs where do I put the rest ? From AccessControl/Plugins I put the…
cesztoszule
  • 286
  • 3
  • 12
7
votes
1 answer

how get cpack to generate correct start menu shortcuts

I want to create an installer for some programs on windows with cmake and cpack. I want to be able to select which programs to install and the selected programs shall show up in the start menu as shortcuts. Here is a simple try. Have done one…
lgwest
  • 1,347
  • 5
  • 16
  • 26
7
votes
4 answers

How to add file in NSIS from different folders

I have the following already set up and working: File file1.bat File file2.xml File common.file1.dll File common.file2.dll File common.file3.exe What I would want, to avoid keeping the common files in the source directory, is reference them from…
sjlewis
  • 780
  • 2
  • 13
  • 25
7
votes
1 answer

NSIS Installer with .NET 4.5

I'm after some code snippets for NSIS to detect and conditionally run the .NET 4.5 installer This answer - NSIS Installer with .NET 4.0 - is too naive as checking only the presense of the registry key (not the value) will not discriminate between…
fiat
  • 15,501
  • 9
  • 81
  • 103