Best practices

From NSIS Wiki

Author: Anders (talk, contrib)

Installers and the applications they install should aspire to meet the certification requirements for Windows desktop apps (The technical requirements for the Windows 7 Client Software Logo Program can be found here).


  • Must have an opt-out option for any bundled apps.
  • Must not take a dependency on Windows compatibility modes, AppHelp message, and or any other compatibility fixes.
  • Must have a compatibility manifest, and use the appropriate GUIDs for the supported versions of Windows.
  • Must follow User Account Control guidelines:
    • Must have a manifest that defines the execution level and tells the operating system what privileges the app requires in order to run .
  • Must support a clean, reversible installation and comply with the Install/Uninstall requirements:
    • The installer must create the correct registry entries to allow successful detection and uninstalls.
    • Do not attempt to replace files protected by Windows File Protection.
  • Must install to the correct folders by default:
    • Shared components that are private to a single software vendor should be stored in $COMMONFILES or $PROGRAMFILES\<company name>\Shared Files.
    • Your app data, which must be shared among users on the computer, should be stored within %ProgramData%.
    • Your app’s data that is exclusive to a specific user and that is not to be shared with other users of the computer, must be stored in $APPDATA and/or $LOCALAPPDATA.
    • Your app must write user data at first run and not during the installation in “per-machine” installations.
  • The %PATH% environment variable is a shared resource.
    • Use the App Paths key to prepend information to the %PATH% environment variable on a per-application basis if possible.

Start Menu/Start Screen

  • Provide icons for the four supported Start screen scale values to ensure that your icons look crisp on all form factors.
  • If you install a suite of apps rather than a single app, add one shortcut for each app in the suite. (Be aware that while the Apps view groups tiles and shows the folder name, this name isn't visible when a tile is pinned to the Start screen, so make your tile names sufficiently descriptive.)
    • Create a single-level product folder for suites that contain three or more tiles.
  • Don't create a product folder if your suite contains only a single shortcut. Place your shortcut in the top-level $SMPROGRAMS folder.
  • Don't provide multiple shortcuts to the same app.
  • Don't create shortcuts to uninstallers, help files, wizards or web sites. (Windows 8+: Shortcuts that don't map to executables, such as shortcuts that launch web sites or help files, are filtered out of the Start screen.)
  • Don't create shortcuts to features or functionality that can be launched from within the app itself.
  • Don't create a tile for a host or runtime for applications, like Silverlight or Java. Provide an entry point to uninstall the framework in Add/Remove Programs and provide any settings entry point in Control Panel.
  • Don't programmatically pin shortcuts, the pin list is a place for users to put their favorite icons.
  • The Quick Launch bar and Favorites menu belong to the user


  • Do not give all users write access to $InstDir. Any executable files like .exe and .dll should only be modifiable by trusted users/groups.
  • The installer should not be named "setup.exe" because a bug in the Windows compatibility layer allows a 3rd-party to inject DLLs with certain names.

See also

Personal tools