Video Screencast Help
Symantec Secure Login will be live on Connect starting February 25. Get the details here.

Developer Guidelines for Designing Applications for Windows Vista

Created: 28 Sep 2007 • Updated: 30 Sep 2007
Language Translations
R-Vijay's picture
0 0 Votes
Login to vote

Here are few basic guidelines for designing applications for Windows Vista.

This article is intended for a developer, however an application packager will also find this information useful.

  1. Do not assume the end user as an admin when we develop a .NET application. We will need to ensure normal users can be fully productive.
  2. Do design the application such that administrative intervention is limited. Identify tasks which needs elevation with a "shield" button.. This shield icon will be an entry point for all administrative operations for the application.
  3. Always test your application as a normal user.
  4. Do not use the registry as an IPC mechanism.
  5. Automatic updates and patches for an application should be done using Windows Installer. The patches will require a certificate from the MSI for installation or updations.
  6. Do not write per-user information or user-writable information to Program Files or Program directories.
  7. Ensure that processes running as standard user do not write to global namespaces like %systemroot% and to other sensitive system areas..Instead use %alluserprofile%.
  8. Check where the settings are stored in the registry. If any settings are stored in HKEY_LOCAL_MACHINE, the application or control panel will most likely require an administrator access token.
  9. Users should have to elevate only to perform tasks that require an administrator access token. All other tasks should be designed to eliminate the need for elevation. Pre-Windows Vista software often requires an administrator access token unnecessarily by writing to the HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT registry sections or to the Program Files or Windows system folders.
  10. Redirect some write operations (system folders and HKLM\Software) to per- user virtual stores.
  11. Do not perform administrative actions on first run. All the administrative actions should be taken care during installation of the exe or MSI. This will avoid the user being annoyed by UAC.
  12. Do not write custom actions to copy files to Windows folder.
  13. Do write application data to a location that the standard user has access to,
    (C:\Users\username\Appdata) : user specific data
    (C:\Users\All Users\Application Data) : not user-specific data.
  14. Command line tools run AsInvoker
  15. Do not register components with rundll32. This feature is not supported in Windows Vista. Calling directly into Rundll32 results in UAC compatibility issues. When an application relies on the Rundll32 executables to perform its execution, Rundll32 calls AIS on behalf of the application to initiate the UAC elevation prompt. As a result, the UAC elevation prompt has no knowledge of the original application and displays the application requesting elevation as "Windows host process (Rundll32)". If there are some existing applications, then register dll using a custom developed exe and call that exe while executing the program/application.
  16. Use application manifests to make the existing applications run on Vista. One can run the application either as a invoker, highest privilege or as an admin.