Best practices: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Start Folder > $SMPROGRAMS)
m (Tweaked Compatibility Cookbook link)
Line 42: Line 42:
** [http://msdn.microsoft.com/en-us/library/ms954371 Appendix A. Best Practices]
** [http://msdn.microsoft.com/en-us/library/ms954371 Appendix A. Best Practices]
* [http://msdn.microsoft.com/en-us/library/windows/desktop/hh848074(v=vs.85).aspx Application Compatibility Cookbook]:
* [http://msdn.microsoft.com/en-us/library/windows/desktop/hh848074(v=vs.85).aspx Application Compatibility Cookbook]:
** [https://msdn.microsoft.com/library/bb757005.aspx#http://msdn.microsoft.com/library/Aa480152 Windows Vista and Windows Server 2008]
** [http://msdn.microsoft.com/library/bb757005.aspx#http://msdn.microsoft.com/library/Aa480152 Windows Vista and Windows Server 2008]
** [http://msdn.microsoft.com/library/dd371778(v=VS.85).aspx Windows 7 and Windows Server 2008 R2]  
** [http://msdn.microsoft.com/library/dd371778(v=VS.85).aspx Windows 7 and Windows Server 2008 R2]  
** [http://msdn.microsoft.com/en-us/library/dn323741(v=vs.85).aspx Windows 8 and Windows Server 2012]
** [http://msdn.microsoft.com/en-us/library/dn323741(v=vs.85).aspx Windows 8 and Windows Server 2012]

Revision as of 11:42, 17 November 2015

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).


Fundamentals

  • 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.


See also