Best practices: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(Created page with "Category:Tutorials {{PageAuthor|Anders}} Installers and the applications they install should aspire to meet the [http://msdn.microsoft.com/en-us/windows/desktop/hh749939....")
 
(Added Start Menu and even more links)
Line 5: Line 5:




== Fundamentals: ==
== Fundamentals ==
* Must have an opt-out option for any bundled apps
* 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 not take a dependency on Windows compatibility modes, AppHelp message, and or any other compatibility fixes.
** [http://blogs.msdn.com/b/oldnewthing/archive/2010/03/11/9976571.aspx Application compatibility layers are there for the customer, not for the program].
* Must have a compatibility [http://nsis.sourceforge.net/Docs/Chapter4.html#amanifestsupportedos manifest], and use the appropriate GUIDs for the supported versions of Windows.
* Must have a compatibility [http://nsis.sourceforge.net/Docs/Chapter4.html#amanifestsupportedos manifest], and use the appropriate GUIDs for the supported versions of Windows.
* Must follow [http://msdn.microsoft.com/en-us/library/windows/desktop/dn742497.aspx User Account Control] guidelines:
* Must follow [http://msdn.microsoft.com/en-us/library/windows/desktop/dn742497.aspx User Account Control] guidelines:
Line 19: Line 20:
** 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’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.
** 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 [http://msdn.microsoft.com/en-us/library/windows/desktop/ee872121(v=vs.85).aspx#appPaths App Paths] key to prepend information to the %PATH% environment variable on a per-application basis if possible.




== See also: ==
== Start Menu/Start Screen ==
* Provide icons for the four supported Start screen [http://msdn.microsoft.com/en-us/library/windows/desktop/jj673981(v=vs.85).aspx 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 Start 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 [http://blogs.msdn.com/b/oldnewthing/archive/2014/12/30/10583474.aspx programmatically pin shortcuts], the pin list is a place [http://blogs.msdn.com/b/oldnewthing/archive/2003/09/03/54760.aspx for users] to put their favorite icons.
 
 
 
== See also ==
* Windows 2000 Application Specifications:
* Windows 2000 Application Specifications:
** [http://msdn.microsoft.com/library/ms954376.aspx Chapter 2. Install/Uninstall]
** [http://msdn.microsoft.com/library/ms954376.aspx Chapter 2. Install/Uninstall]
Line 30: Line 46:
** [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]
** [http://msdn.microsoft.com/en-us/library/dn323742(v=vs.85).aspx Windows 8.1 and Windows Server 2012 R2]
** [http://msdn.microsoft.com/en-us/library/dn323742(v=vs.85).aspx Windows 8.1 and Windows Server 2012 R2]
* [http://msdn.microsoft.com/en-us/library/windows/desktop/ee872123(v=vs.85).aspx Guidelines for File Associations and Default Programs]
** [http://msdn.microsoft.com/en-us/library/windows/desktop/cc144109(v=vs.85).aspx Registering Programs with Client Types]
** [http://msdn.microsoft.com/en-us/library/windows/desktop/cc144162(v=vs.85).aspx Set Program Access and Computer Defaults (SPAD)]
** [http://msdn.microsoft.com/en-us/library/windows/desktop/cc144156(v=vs.85).aspx Best Practices for File Associations]
* [http://dev.windows.com/en-us/develop/app-certification-kit Windows App Certification Kit]
* [http://dev.windows.com/en-us/develop/app-certification-kit Windows App Certification Kit]
** [http://msdn.microsoft.com/library/windows/desktop/hh749939 Certification requirements for Windows desktop apps]
** [http://msdn.microsoft.com/library/windows/desktop/hh749939 Certification requirements for Windows desktop apps]
Line 38: Line 58:
* [http://web.archive.org/web/20140804033044/http://dev.windows.com/en-us/getstarted/Windows-8-1-product-guide Windows 8.1 Product Guide]
* [http://web.archive.org/web/20140804033044/http://dev.windows.com/en-us/getstarted/Windows-8-1-product-guide Windows 8.1 Product Guide]
* [http://msdn.microsoft.com/library/windows/hardware/gg463010 Windows hardware certification (aka Windows Logo Program for Hardware or WHQL)]
* [http://msdn.microsoft.com/library/windows/hardware/gg463010 Windows hardware certification (aka Windows Logo Program for Hardware or WHQL)]
** [https://msdn.microsoft.com/en-us/library/hh848077(v=vs.85).aspx Windows Hardware Certification Kit]
** [http://msdn.microsoft.com/en-us/library/hh848077(v=vs.85).aspx Windows Hardware Certification Kit]

Revision as of 11:39, 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 Start 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