Giter Site home page Giter Site logo

serge-rider / nsismultiuser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drizin/nsismultiuser

1.0 1.0 0.0 667 KB

Installer/Uninstaller that allows installations "per-user" (no admin required) or "per-machine" (asks elevation only when necessary)

License: MIT License

NSIS 100.00%

nsismultiuser's Introduction

NSIS Multi User Plugin

NSIS plugin that allows "per-user" (no admin required) and "per-machine" (asks elevation only when necessary) installations. This plugin was inspired by MultiUser.nsh (by Joost Verburg), but supports a lot of new features and is easier to use.

How It Works

Installer

The plugin creates a custom Install Options page based on the nsDisalogs library that is displayed before the Components page. The page is displayed always and has two options: install for all users (per-machine) and install for current user only (per-user). When the user starts the setup, he is not forced to elevate in the beginning. If the user selects per-user install, he can install only for himself without being asked for elevation (except when there is per-machine installation that needs to be removed first). If the user selects per-machine install, the Windows shield is displayed on the Next button and elevation is required. Limited users can also install per-machine as long as they know the administrator credentials.

Uninstaller

The plugin creates the same custom page and shows it in the beginning of the uninstaller if there are two installations. Elevation is required only when per-machine version is uninstalled. If there is only one installed version or if command-line parameters are passed specifying which version to uninstall, the page is not displayed. In this case, the uninstaller asks for elevation if per-machine version is to be uninstalled. When invoked from the Windows Uninstall dialog or from the Start menu, a parameter to the uninstaller is passed, so that it detects which verion to uninstall, and the page is not displayed.

Both

An option (MULTIUSER_INSTALLMODE_ALLOW_ELEVATION) defines whether elevation if allowed. If elevation is disabled, the per-machine option becomes available only if the (un)installer is started elevated from Windows and is disabled otherwise.

An option (MULTIUSER_INSTALLMODE_ALLOW_BOTH_INSTALLATIONS) defines whether simultaneous per-user and per-machine installations on the same machine are allowed. If set to disallow, the installer alaways requires elevation when there's per-machine installation in order to remove it first.

Features

  • Not tied or dependant on any particular user interface. Supports Modern UI 1/2, ModernUIEx, Ultra Modern UI, the native NSIS interface, as well as any other interface that supports nsDialogs pages.
  • Includes fully functional demos for all supported interfaces that you can use as skeletons to start your scripts from.
  • Support for 64-bit installations
  • Correctly creates and removes full registry uninstall information like icon and estimated size (separate per-user and per-machine entries)
  • Fully supports silent mode, command-line switches and error level handling
  • Fully documented

Screenshots

When MULTIUSER_INSTALLMODE_ALLOW_ELEVATION is 1, there is no existing istallation and running as a regular user (Ultra Modern UI). Installation for current user requires no elevation:

Installation for current user requires no elevation Per-user installation folder

Installation for all users requires elevation:

Installation for all users requires elevation

When running as admin, no elevation is required:

When running as admin, no elevation is required

When there is an existing installation, it is always selected (Modern UI 2):

Existing instalation is always selected

When MULTIUSER_INSTALLMODE_ALLOW_BOTH_INSTALLATIONS is 0, there is existing per-machine installation and running as a regular user, elevation to install per-user is required (Modern UI 2):

When there is per-machine installation and elevation per-user is required

When MULTIUSER_INSTALLMODE_ALLOW_ELEVATION is 0 and running as a regular user, per-machine option is disabled (native NSIS interface):

Per-machine option is disabled

When invoked with the /allusers parameter and MULTIUSER_INSTALLMODE_ALLOW_ELEVATION is 1 (native NSIS interface):

/allusers parameter

When invoked with the /allusers parameter and MULTIUSER_INSTALLMODE_ALLOW_ELEVATION is 0:

/allusers parameter and elevation is disabled

When there are both per-user and per-machine installations and uninstaller is invoked without parameters, page is displayed (Ultra Modern UI):

Uninstaller page

The Windows Uninstall list of programs will show individual entries when there are both per-machine and per-user installations (one is stored in HKLM and other in HKCU):

The Windows Uninstall list of programs

The help dialog, invoked with the /? parameter:

The help dialog

Usage

Please look at the fully functional demos in the Demos folder.

Documentation

The full NsisMultiUser documentation is avaialable on the Wiki.

You can also look at:

nsismultiuser's People

Contributors

alexmitev81 avatar bitraid avatar drizin avatar lcferrum avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.