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
13
votes
6 answers

How to create a batch file which work for both Program Files and Program Files(x86)?

I have created a batch file which automatically copy a .sql file to the path of installed Jasper server(it could be any software installation directory). This is my batch script-- C:\PROGRA~2\JASPER~1.0\mysql\bin\mysql.exe -u root -proot <…
Sharad
  • 3,562
  • 6
  • 37
  • 59
12
votes
2 answers

What is the environment variable for AppData in NSIS installer script?

I am looking for the environment variable for AppData in NSIS. I need to copy fils to the AppData directory in my installation.
kakka47
  • 3,479
  • 8
  • 44
  • 52
12
votes
2 answers

How to execute an NSIS uninstaller from within an another NSIS installer and wait for it to finish?

I have an installer, a compiled NSIS script and it first checks if another version of my application is running on the system. If another instance exists, then it first triggers the silent uninstallation and then proceeds with installation of the…
user573696
  • 121
  • 1
  • 3
12
votes
1 answer

NSIS Installer without Admin Privileges

I'm trying to configure the NSIS installer to run without admin privileges. Is this possible? I'm testing as a non-admin user because some customers don't have those privileges. What settings in NSIS cause the installer require admin privileges?…
Dan
  • 2,304
  • 6
  • 42
  • 69
11
votes
1 answer

How to create an icon shortcut with NSIS?

I'd like to create an icon-shortcut for my jar file with NSIS I've tried so, but after it doesn't display the icon I would to change. ; Shortcuts !insertmacro MUI_STARTMENU_WRITE_BEGIN Application CreateShortCut "$DESKTOP\Brio Gate.lnk"…
user1197919
  • 111
  • 1
  • 2
  • 6
11
votes
2 answers

NSIS: Installing an Application to always Run as Administrator

I have a NSIS script that is working well for a large application. I have read many threads all over the web, but cannot get a clear answer to the following: is it possible to install an application using NSIS which, when launched (regardless of the…
MoonKnight
  • 23,214
  • 40
  • 145
  • 277
11
votes
2 answers

How do i add the program in windows add/remove program list

How do i add the program so that it is listed (so i can click on it to uninstall) in windows's add/remove program list?
Jason94
  • 13,320
  • 37
  • 106
  • 184
11
votes
3 answers

NSIS script for java installation

I want to install Java using an NSIS script, but i have to know whether Java is installed or not in the system (Windows). based on the register keys how can we check if Java is installed or not? Can anybody provide an NSIS script to check Java…
pmad
  • 1,537
  • 3
  • 17
  • 20
11
votes
2 answers

NSIS Installer with .NET 4.0

Is there a standard/preferred method for automatically downloading and installing the .NET 4.0 Framework from an NSIS installer, if the machine doesn't already have it? There are several examples for making this work on older versions of the…
Brad
  • 159,648
  • 54
  • 349
  • 530
11
votes
2 answers

Is it safe to do "RmDir /r $INSTDIR" in NSIS?

I noticed this warning in the documentation for NSIS's RmDir method: Warning: using RMDir /r $INSTDIR in the uninstaller is not safe. Though it is unlikely, the user might select to install to the Program Files folder and so this command…
Cuga
  • 17,668
  • 31
  • 111
  • 166
11
votes
5 answers

Creating Windows Desktop Icon in CMake + CPack + NSIS

I'm using NSIS package generator in CMake 2.8.1 to distribute a Qt application. Everything is working fine... except the use of CPACK_CREATE_DESKTOP_LINKS to create a desktop link to the application. I've looked through the CMake source (including…
metasim
  • 4,793
  • 3
  • 46
  • 70
11
votes
2 answers

Suppress Windows command output when using 'ExecWait' in NSIS

I am trying to suppress the output window which pops up after executing a psql command in NSIS ExecWait 'psql -U postgres -f "Path\To\File.sql" postgres' I tried '>nul' after looking at this link. But that doesn't work.
Lyman Zerga
  • 1,415
  • 3
  • 19
  • 40
11
votes
2 answers

How can I make a section in NSIS unchecked by default

I have a NSIS installer, here I have some components that user can choose to install: Section "Modules" SecModules SetOutPath "$INSTDIR" CreateDirectory $INSTDIR\modules ... SectionEnd Section "Freenode util" SecFreenode SetOutPath…
Petr
  • 13,747
  • 20
  • 89
  • 144
11
votes
5 answers

CurrentVersion value in registry for each windows operating system

I want to know CurrentVersion value for each operating system at HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" For example: I have windows 7 professional installed on my machine and CurrentVersion value is 6.1. Can any one list it down for…
Ajinkya
  • 1,701
  • 4
  • 25
  • 42
11
votes
1 answer

NSIS IfFileExists - more than one line

I'm using the IfFileExists function but I think it only include the first line after the jump. How can I do something similar to C like {..../.../....}?! IfFileExists "$PROGRAMFILES\InduSoft Web Studio v7.0\Bin\RunStartUp.exe" StartUpExists…
metRo_
  • 445
  • 1
  • 7
  • 18