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

How do I require user to uninstall previous version with NSIS

I have just started using NSIS. It works very well but I find the documentation a bit unstructured. How do I require user to uninstall previous version before installing a new version with NSIS? NSIS (Nullsoft Scriptable Install System) is an open…
Nifle
  • 11,745
  • 10
  • 75
  • 100
10
votes
2 answers

Accessing command line arguments in NSIS

I am trying to make my setups scripts modular. I am calling setup exe's from within main setup script based to the requirements. I want to pass command line arguments to the exe being called. Can someone please tell me how to access the command line…
user774294
  • 121
  • 1
  • 1
  • 6
10
votes
4 answers

Specifying non-ASCII characters for NSIS' LangString

I'm using NSIS to generate a Windows' installer for my application. I'd like a multi-lingual installer. I'm using LangString for specifying strings. However, the documentation doesn't seem to say how one should encode a non-ASCII character. For…
Paul J. Lucas
  • 6,895
  • 6
  • 44
  • 88
10
votes
1 answer

NSIS - check if process exists (nsProcess not working)

For my NSIS uninstaller, I want to check if a process is running. FindProcDLL is not working under Windows 7 x64, so I tried nsProcess. I've downloaded the version 1.6 from the website: http://nsis.sourceforge.net/NsProcess_plugin If I start the…
Struct
  • 950
  • 2
  • 14
  • 41
10
votes
1 answer

NSIS - How to copy recursively while excluding files?

I need to copy a directory recursively but exclude a couple of directories within it. The documentation for NSIS says the File command takes /r and /x parameters, but I cannot get them to work together properly. The structure of my directory…
Cuga
  • 17,668
  • 31
  • 111
  • 166
10
votes
1 answer

NSIS - check if registry key value exists

I need to check, if a registry value exists. How can I do that? My first approach: ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" "NUL:" ${IF} $0 == "" MESSAGEBOX MB_OK "NUL exists" ${ELSE} …
user3629892
  • 2,960
  • 9
  • 33
  • 64
10
votes
4 answers

Checking if the application is running in NSIS before uninstalling

I am new to NSIS, and I need to know that in the uninstaller, how I can check if the application (which is in C++) is running and close it before uninstalling.
Mahkameh
  • 101
  • 1
  • 1
  • 3
10
votes
4 answers

How to launch an executable on the end of installation with proper rights?

I'm launching my Windows application this way after the installation completes: !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchApplication" ... Function LaunchApplication ExecShell "" "$INSTDIR\Application.exe" FunctionEnd But this has a strange…
Casady
  • 1,426
  • 3
  • 19
  • 39
10
votes
3 answers

Reproducing the blocked exe "unblock" option in file properties in windows 2003

When I download my program from my website to my windows 2003 machine, it has a block on it and you have to right click on the exe, then properties, then select the button "Unblock". I would like to add detection in my installer for when the file is…
Brian R. Bondy
  • 339,232
  • 124
  • 596
  • 636
10
votes
1 answer

Writing registry value in a 64-bit system

I have an application setup build in NSIS. The set requires a key to be created at the following location for my application to start:- HKEY_LOCAL_MACHINE\Software\\\" "VersionNo" 0 …
Bomzinho
  • 161
  • 1
  • 7
  • 14
9
votes
3 answers

Existing solutions to test a NSIS script

Does anyone know of an existing solution to help write tests for a NSIS script? The motivation is the benefit of knowing whether modifying an existing installation script breaks it or has undesired side effects.
brian_d
  • 11,190
  • 5
  • 47
  • 72
9
votes
1 answer

How to create an installer for a Windows 10 HWA bundle?

I've built a Windows 10 Hosted Web App (HWA) using MS Visual Studio 2015. Now, I've investigated if there is a way to create a standalone installer for it - which bundles the generated .appx and related files into a one-click executable. Sadly, so…
MWiesner
  • 8,868
  • 11
  • 36
  • 70
9
votes
1 answer

NSIS MUI - how to write custom text to install log?

When copying files, I am doing few things with them... is it possible to notify user what is going on during installation in textbox that shows copied files? I was tryting to find that information in internet, but without luck... not sure what to…
Flash Thunder
  • 11,672
  • 8
  • 47
  • 91
9
votes
1 answer

NSIS: using environment variable at compile time?

If I'm not mistaken, all discussion about environment variables (EVs) in NSIS docs (eg ReadEnvStr), deal with EVs in the target computer: all happens at install time. I wonder if there is any support for accesing EVs on the developer (build)…
leonbloy
  • 73,180
  • 20
  • 142
  • 190
9
votes
1 answer

NSIS - Define InstallDir depending on FileExists

What I want to do with this script is to copy a file in a folder who already exists. But it can be at the root (C:) or in the program files. There what I want, but this script doesn’t work: ${If} ${FileExists} "C:\Cisco Systems\VPN…
geek1983