| MSDN Home > MSDN Library > .NET Development > Windows Vista > |
|
Microsoft Corporation July 2006 The Windows Vista Developer Story includes content for developers, and other technology experts and managers, interested in an in-depth exploration of some of the new and extended features in Windows Vista. It is released to the Windows Vista Developer Center in the form of Articles, published approximately one every two weeks. Those Articles are only a summary of the Windows Help file, which can be downloaded here. Note This topic is pre-release documentation and is subject to change in future releases. Note To provide feedback about the articles, please send email to Vistadev@microsoft.com. ContentsIntroduction IntroductionMicrosoft Windows Vista introduces the next generation operating system technology and software development platform that will be used by application developers and enterprises worldwide. As part of enhancing the security and user experience of Windows Vista, many new features have been introduced and existing features have been improved. While Windows Vista is highly compatible with most of the applications written for Microsoft Windows XP, Microsoft Windows Server 2003, and their service packs, some amount of compatibility breaks are inevitable due to new innovations, security tightening, and increased reliability. Overall, Windows Vista compatibility is high, and Microsoft is continuously striving to achieve the best possible compatibility solutions for existing applications for Windows Vista. This document is the first step for application developers to become familiar with how to verify the compatibility of their applications. This document also provides an overview of the few known application incompatibility issues in Windows Vista and provides links to detailed white papers and other developer guidance. There are several new features that will enable developers to troubleshoot and workaround applications that do not function properly under Windows Vista, such as the following:
Thirty-Minute Compatibility CheckThis section provides guidance on how to test and evaluate the compatibility of an application on Windows Vista. There are two primary scenarios to test for compatibility on Windows Vista, as follows. Working with a Clean Installation of Windows Vista
Working with an Upgrade from Windows XP Service Pack 2
If both scenarios have been completed and the application has performed properly, then the application functions correctly under Windows Vista. For information about obtaining certification for your application, see the Windows Vista Home Page. LinksOperating System VersioningFeature ImpactHigh Brief DescriptionThe internal version number for Windows Vista is 6. The Note This is the next major version number from Windows XP (version 5.x). ManifestationThe manifestation of this version change is very application-specific, as follows:
MitigationMost applications will function properly on Windows Vista because the application compatibility in Windows Vista is very high. However, for applications and installers that check for OS version, a Compatibility mode is provided in Windows Vista. Users can right-click the shortcut or the EXE and apply the Windows XP SP2 compatibility mode from the Compatibility tab. In most cases, this should enable the application to work as it did on Windows XP without a need for any changes to the application. Remedies
User Account ControlFeature ImpactHigh Brief DescriptionA fundamental step toward increasing the security of Windows is enabling interactive users to run with a standard user account, which gives them access to only a limited set of permissions and privileges. By default, Windows Vista will run every application as a standard user even if you log on as a member of the administrator's group. Conversely, when users attempt to launch an application that has been marked as requiring administrator permissions, the system will explicitly ask them to confirm their intention to do so. Only applications running with administrator privileges can modify system and global settings and behavior. This feature of Windows Vista is the User Account Control (UAC). Manifestation
RemediesQuick solution for custom installers:
Quick solution for applications that require administrative privileges to perform system modifications or write to privileged areas:
Compatibility test:
Leverage Windows Vista capability solution:
Links
User Account Control - Application Update GuidelinesFeature ImpactMedium Brief DescriptionMany existing applications have a tendency to incorporate update functionality in their application. The goal of embedding update functionality is to ensure that the client is running the most up to date binary that the ISV can offer. It has been found that a number of applications, when they perform their updating functions, require more privileges than that of a Standard user. Often, the per-machine files that were laid down during installation need to be serviced. As per the UAC model for running and installation applications, only the elevated administrator in Admin Approval Mode Admin has sufficient privileges to perform these actions. The Windows Vista Installer Detection heuristics detect many applications' updaters correctly and elevate the updater process appropriately so that the update completes successfully on elevation. However, a few areas remain where application updates cannot complete successfully. For example:
ManifestationApplication update functionality fails RemediesOut of Process updaters not Install Detected
Multi Purpose Executables/In-Process UpdatesOn Vista, there is no good way to create a multi-purpose executable that performs updates because you can't toggle the state under which an executable is run. Consequently, the executable will always have to run as Administrator. Instead, applications should follow one of the following methods to perform updates.
Linkshttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/patching_and_upgrades.asp http://msdn.microsoft.com/msdnmag/issues/04/05/ClickOnce/ Windows Resource Protection (WRP)Feature ImpactHigh (may block the application from installing or running) Brief DescriptionAs an initiative to increase system stability, predictability and reliability, Windows Resource Protection (WRP) protects Windows read-only resources: specifically OS files, folders, and registry keys that are non-configurable by design. See Protected Resource List. WRP enforces this protection using Windows Security by specifying special security descriptors on the resource. Any process, including those running as administrator or system, do not have rights to make changes to WRP resources; they can read and execute. Full access to WRP resources is restricted to Windows Modules Installer service. As a result, read-only system state is protected from the inadvertent impact of application installs and administrator modifications, which improves system stability. ManifestationApplications (typically this happens during application install and uninstall) will not succeed in replacing or modifying protected OS resources, with the following results:
Because applications are prevented from making changes to WRP resources, and related errors are suppressed, runtime errors may result. MitigationsImportant The following mitigation will not be applied if the application has a manifest that specifies a requestedExecutionLevel as required by UAC. For well-known installers, Access Denied errors resulting from attempts to create, modify, or delete WRP resources will be suppressed, and no changes are applied to the WRP resource. Remedies
WRP Protected KeysIt is expected that if an application attempts to create/modify/delete a WRP key then that application will get an "Access Denied" error. When you encounter an "Access Denied" error, verify that the access denied error is a result of a WRP Security Descriptor on the key (or a parent key) and not because the user does not having enough permissions to write to the key. The decision on how to handle an "Access Denied" error because of WRP will depend on the impact of this failure for the application:
How to recognize if a resource is WRP: For Registry:
For files:
Internet Explorer Protected ModeFeature ImpactHigh Brief DescriptionIn Windows Vista, Microsoft Internet Explorer 7 runs in Protected Mode, which can help protect users from attack by running the Internet Explorer process with greatly restricted privileges. Protected Mode significantly reduces the ability of an attack to write, alter, or destroy data on the user's machine or to install malicious code. It can help protect a user from malicious code installing itself without authorization. This is the default mode for Internet Explorer when Windows Vista is installed. Manifestation
Protected Mode builds on the new integrity mechanism to restrict write access to securable objects like processes, files, and registry keys with higher integrity levels. When run in Protected Mode, Internet Explorer is a low-integrity process; it cannot gain write access to files and registry keys in a user's profile or system locations. Low-integrity processes can only write to folders, files, and registry keys that have been assigned a low-integrity mandatory label. As a result, Internet Explorer and its extensions run in Protected Mode, which can only write to low-integrity locations, such as the new low-integrity Temporary Internet Files folder, the History folder, the Cookies folder, the Favorites folder, and the Windows Temporary Files folders. Furthermore, the Protected Mode process will run with a low desktop integrity level when Windows Vista ships, which will prevent it from sending specific window messages to higher integrity processes. By preventing unauthorized access to sensitive areas of a user's system, Protected Mode limits the amount of damage that can be caused by a compromised Internet Explorer process or malware. An attacker cannot, for example, silently install a keystroke logger to the user's Startup folder. Likewise, a compromised process cannot manipulate applications on the desktop through window messages. Of course, these defenses also limit legitimate changes to higher integrity locations (IL). As a result, Protected Mode provides a compatibility architecture that reduces the impact on existing extensions, as shown in the following figure.
Figure 1. A compatibility layer handles the needs of many existing extensions. It intercepts attempts to write to medium integrity resources, such as the My Documents folder in the user profile and the HKEY_CURRENT_USER registry hive. The compatibility layer uses a generic Windows compatibility fix to automatically redirect these operations to the following low-integrity locations:
Two higher privilege broker processes allow Internet Explorer and extensions to perform elevated operations given user consent. For example, the user privilege broker (IEUser.exe) process provides a set of functions that let the user save files to areas outside of low-integrity areas. In addition, an administrator privilege broker (IEInstal.exe) process allows Internet Explorer to install ActiveX controls. RemediesQuick solution:
Compatibility test:
Leverage Windows Vista capability solution:
Links
Windows Vista 64-bitFeature ImpactHigh Brief DescriptionWindows Vista fully supports the 64-bit architecture processors from AMD and Intel. The 64-bit version of Windows Vista can run all 32-bit applications with the help of the WOW64 emulator. However, 16-bit applications, 16-bit installers, and 32-bit kernel mode drivers are not supported by the kernel. All 64-bit drivers have to be digitally signed for Windows Vista 64-bit editions. Unsigned drivers are not supported and cannot be installed on 64-bit Windows Vista. The digital signature check is done both during installation and driver load time. Manifestation
RemediesLeverage Windows Vista capability solution:
Compatibility test:
Links
Microsoft Graphical Identification and Authentication (GINA)Feature ImpactHigh (frequency: low) Brief DescriptionPrior to Windows Vista, to log on to a third-party server or with a third-party device, ISVs had to replace the Graphical Identification and Authentication (GINA) dynamic-link library in Windows XP. Such applications also had to replace the existing UI and implement smart card and remote desktop features on Windows XP. Note If an application did not function this way in Windows XP, then this information does not apply. Windows Vista introduces a new authentication model where LogonUI and WinLogon communicate directly with each other. This model provides simplicity, scalability, and flexibility that did not exist with GINA. Unlike the GINA module, ISVs no longer need to replace the UI for the logon screen, thus relieving the ISV of the burden of re-authoring the user interface for the user. An ISV can author a credential provider, which is a module that plugs into the LogonUI, to describe the UI and to gather the credential and pass it on to WinLogon. Credential providers are completely transparent to WinLogon. Credential providers are also additive, meaning that users can install multiple credential providers and pick the one they want to use. Credential providers can be user selected and/or event driven. Multiple credential providers can coexist on Windows Vista and are not only for third parties. In fact, Windows will ship two credential providers in the box: a user name and password credential provider and a smart card credential provider. Additionally, credential providers can be reused within CredUI. That is, the same object that describes and collects credential information on LogonUI can be used to gather the very same credentials in CredUI scenarios. The GINA functionality from Windows XP and Windows Server 2003 has been deprecated and removed from Windows Vista. The GINA modules of applications will not function and will have to be re-authored using the new authentication model for Windows Vista. Manifestation
RemediesLeverage Windows Vista capability solution:
Links
Session 0 IsolationFeature ImpactHigh (frequency: low) Brief DescriptionIn Windows XP, Windows Server 2003, and earlier versions of the Windows operating system, all services run in the same session as the first user who logs on to the console. This session is called Session 0. Running services and user applications together in Session 0 poses a security risk because services run at elevated privilege and therefore are targets for malicious agents who are looking for a means to elevate their own privilege level. The Microsoft Windows Vista operating system mitigates this security risk by isolating services in Session 0 and making Session 0 non-interactive. In Windows Vista, only system processes and services run in Session 0. The first user logs on to Session 1, and subsequent users log on to subsequent sessions. This means that services never run in the same session as users' applications and are therefore protected from attacks that originate in application code. Specific examples of affected driver classes include:
Application classes affected by this feature:
ManifestationIf a service belonging to an application throws a UI, the application is waiting on the service, and the UI is not displayed in the user session. RemediesQuick solution:
Compatibility test:
Leverage Windows Vista capability solution:
Links
Networking: TCP/IP Stack and the Windows Filtering PlatformFeature ImpactHigh Brief DescriptionThe Windows Vista networking stack has been completely rewritten. Instead of the dual stack model that exists in Windows XP or Windows Server 2003 (to support IPv4 and IPv6), Windows Vista implements a new architecture whereby there is a single transport and framing layer that support multiple IP layers. There are several new features and protocols enhancements. The new stack is very modular, flexible, and extensible. While all attempts have been made to maintain application compatibility with the existing applications that interface with the stack at various layers, nevertheless, there are changes (that are mostly side-effects of the improvements) that may have potential application compatibility issues and that application developers must carefully evaluate to understand the impact of these changes on their applications. The Microsoft Windows Filtering Platform (WFP) API allows developers to create code that interacts with the filtering that takes place at several layers in the Windows Vista and Microsoft Windows Server Code Name "Longhorn" operating system networking stack and throughout the operating system. WFP also integrates with and provides support for firewall features, such as authenticated communication and dynamic firewall configuration, based on an application's use of the sockets API. Note WFP is not a firewall itself. It is a set of system services and APIs that enable firewalls to be implemented. The following elements of the TCP/IP stack will not be supported on Windows Vista:
Manifestation
RemediesLeverage Windows Vista capability solution:
LinksNetworking: Kernel Mode IP Helper APIsFeature ImpactHigh Brief DescriptionIn prior releases of Windows, Winsock clients did not have an API set to access the kernel. This will change in Windows Vista. Also, Windows Vista now supports IPv6 by default. Instead of providing separate APIs for IPv4 and IPv6, a new Helper API set was designed to provide a common functionality across all the new technologies, as follows:
ManifestationApplications using the older Helper APIs or undocumented kernel function calls will fail to function and may become unstable. Remedies
Links
Networking: IPv6Feature ImpactHigh (frequency: medium) Brief DescriptionThe TCP/IP stack in Windows Vista has IPv6 enabled by default. IPv6 connectivity is preferred, if available. This has the following implications for applications that hook into the TCP/IP stack:
The TCP/IP stack in Windows Vista supports a strong host routing model. This means that packets are routed from a multi-homed machine not only based on the destination address but also based on the source address of a packet. This change is needed because in IPv6, each machine gets multiple IP addresses and, with transition technologies, essentially appears as a multi-homed machine as far as routing is concerned. To ensure proper connectivity happens in these scenarios, the networking stack has to implement a strong host routing model. ManifestationApplications using the Windows XP TCP/IP stack and/or unaware of the IPv6 protocol will not function properly and may crash or create an unstable system. The implication of the strong host routing model for the applications is as follows:
RemediesApplications will need to be re-authored as follows:
LinksNetworking: Turning off the Windows FirewallFeature ImpactHigh Brief DescriptionIn order to avoid the situation where a userinstalled firewall (which is compatible with Windows XP but is incompatible with Windows Vista) attempts to turn off the Windows Firewall in Windows Vista, Microsoft has deprecated the Windows Firewall XP SP2 ManifestationApplications using the Windows XP SP2 RemediesApplications (typically firewalls) replacing the Windows Firewall with their own firewall solution, must carefully consider the following security-related points:
Microsoft further recommends that these applications:
Applications can disable Windows Firewall with Advanced Security by using the following code example. To protect users, they you should only disable Windows Firewall with Advanced Security after: (1) you have successfully turned on your firewall solution with the recommended settings; and (2) you have notified the user that Windows Firewall with Advanced Security is going to be disabled. C++#include <objbase.h>
#include <windows.h>
#include <stdio.h>
#include <comutil.h>
#include <strsafe.h>
#include <netfw.h>
#import "netfw.tlb"
HRESULT
CoCreateInstanceAsAdmin(
HWND hwnd,
REFCLSID rclsid,
REFIID riid,
__out void ** ppv
)
{
BIND_OPTS3 bo;
WCHAR wszCLSID[50];
WCHAR wszMonikerName[300];
StringFromGUID2(rclsid, wszCLSID, sizeof(wszCLSID)/sizeof(wszCLSID[0]));
HRESULT hr = StringCchPrintf(wszMonikerName,
sizeof(wszMonikerName)/sizeof(wszMonikerName[0]),
L"Elevation:Administrator!new:%s", wszCLSID);
if (FAILED(hr))
return hr;
memset(&bo, 0, sizeof(bo));
bo.cbStruct = sizeof(bo);
bo.hwnd = hwnd;
bo.dwClassContext = CLSCTX_LOCAL_SERVER;
return CoGetObject(wszMonikerName, &bo, riid, ppv);
}
int __cdecl main()
{
HRESULT hr;
BOOL fComInitialized = FALSE;
try
{
//
// Initialize the COM library on the current thread
//
hr = CoInitialize(NULL);
if (FAILED(hr))
{
_com_issue_error(hr);
}
fComInitialized = TRUE;
NetFwPublicTypeLib::INetFwPolicy2Ptr sipFwPolicy2;
hr = CoCreateInstanceAsAdmin(GetDesktopWindow(),
__uuidof(NetFwPolicy2), IID_PPV_ARGS(&sipFwPolicy2));
if (FAILED(hr))
{
_com_issue_error(hr);
}
sipFwPolicy2->FirewallEnabled[NetFwPublicTypeLib::NET_FW_PROFILE2_DOMAIN] = FALSE;
sipFwPolicy2->FirewallEnabled[NetFwPublicTypeLib::NET_FW_PROFILE2_PRIVATE] = FALSE;
sipFwPolicy2->FirewallEnabled[NetFwPublicTypeLib::NET_FW_PROFILE2_PUBLIC] = FALSE;
}
catch (_com_error& e)
{
printf ("Error. HRESULT message is: %s (0x%08lx)\n", e.ErrorMessage(), e.Error());
if (e.ErrorInfo())
{
printf ("Description: %s\n", (char *)e.Description());
}
}
if (fComInitialized)
{
CoUninitialize();
}
return 0;
}
Visual Basic Scriptoption explicit
' Profile Type
Const NET_FW_PROFILE2_DOMAIN = 1
Const NET_FW_PROFILE2_PRIVATE = 2
Const NET_FW_PROFILE2_PUBLIC = 4
Dim fwPolicy2
Set fwPolicy2 = CreateObject("HNetCfg.FwPolicy2")
fwPolicy2.FirewallEnabled(NET_FW_PROFILE2_DOMAIN) = FALSE
fwPolicy2.FirewallEnabled(NET_FW_PROFILE2_PRIVATE) = FALSE
fwPolicy2.FirewallEnabled(NET_FW_PROFILE2_PUBLIC) = FALSE
LinksWindows Firewall with Advanced Security Reference Compatibility RisksDeprecated ComponentsThe following components from earlier Windows releases will not be present in Windows Vista:
Help and Support CenterThe Help and Support Center (HelpCtr.exe) was a Help application designed for Windows XP and Windows Server 2003. The Help and Support Center displayed compiled Help files with the .CHM file name extension. The Help and Support Center is not included in Windows Vista and its features are not supported. Compiled Help files with the .CHM file name extension will only be displayed in the HTML Help application as described above. Assistance Platform ClientThe Assistance Platform client (HelpPane.exe) is a new Help engine designed for Windows Vista. It is not compatible with any previous versions of Windows. The Assistance Platform client is required to display Help files with the .H1S file name extension. In Windows Vista, the Assistance Platform client can be customized by OEMs, system builders, and enterprise customers under license agreement, but cannot be used by third-party programs. For more information on customizing the Assistance Platform client, see the Windows SDK. Windows Vista Display Driver Model (VDDM)Windows Vista Display Driver Model (VDDM) is a completely new display driver model that improves display driver stability in Windows. There are a number of key features in VDDM, including:
While most of the applications from earlier versions of Windows should not be impacted by VDDM, some risks include:
Links
Safe Exception HandlingIn earlier Windows versions, the Safe exception handling (SEH) also goes hand-in-hand with the no-execute flag. Exception handlers are checked that they are marked page_execute before the exception is dispatched, and also that the handler is valid code and that it is in the SEH table. DLLmain OperationsThe load order of DLLs during process creation is not guaranteed and should never be depended upon to perform operations. Complex processing in
Outlook Express RenamedOutlook Express has been changed and moved, and is now called Windows Mail. MAPI applications need to be aware of this change. Most applications that dynamically use the default program for MAPI should not see any compatibility problems. Shell: Themes and My Documents LocationThe Windows Explorer Shell has introduced new visual themes for Windows Vista. An application capable of handling themes in earlier versions of Windows should have no compatibility impact with the new themes. Also, the My Documents location and structure has changed in Windows Vista to provide a better user experience. The user data is now stored in \users\%username%\ folder structure. Pictures, Music, Documents, Desktop, and Favorites are all new folders directly under this structure. If an application uses the Fast User Switching (FUS)Fast User Switching (FUS) is now available on Windows Vista for all versions, including domain joined computers. Applications and installers need to be aware of FUS and be able to handle multiple logged in user sessions and terminal server scenarios. For more information, see Microsoft Windows XP Fast User Switching: Design Guide for Building Business Applications. CriticalSection Code ChangesCriticalSection code was changed to increase security and robustness. Applications using critical section locks:
For more information, see the critical section objects topic in MSDN. User Interface Privilege Isolation (UIPI)In Windows Vista, User Interface Privilege Isolation (UIPI) is enabled by default. As a result of this security feature, a process in a lower integrity level cannot communicate with a higher integrity level process using Windows Messaging ( Default ProgramsFeature ImpactMedium Brief DescriptionDefault Programs is a new infrastructure to manage per user file and protocol associations designed with contentious applications in mind. Applications need to register in order to use Default Programs functionality. Be aware that Default Programs will get a lot of visibility in Windows Vista and beyond and make certain tasks much easier for applications to code and maintain. It is difficult in today's software ecosystem to manage your default behaviors in Windows because there are so many competing applications for common tasks. Many people have multiple software programs that do the same things: browse the web, view photos, play music, watch movies, and manage e-mail to name a few. Many people have great difficulty because even if they decide to try an application, it has forever taken over their system and default behaviors like double click. The problem gets worse as we start adding multiple users onto the same computer. As multiple users start using different applications they will start stomping on each others defaults. The root of this problem is that both protocols and file association are typically only taken or managed on a per machine basis by writing keys in the registry to HKLM (HKEY_Local_Machine). To make the matter more difficult there are multiple places in the registry where applications write to take the defaults. This often results in some applications writing to one place in the registry and other applications writing to another place. The problem gets worse as these applications want to reclaim being the default for certain behaviors but they can't because they aren't writing to all the places other applications have. The core problem is that there needs to be an easy way to manage applications on the system that have competing interests. RemediesWindows first attempt to solve this problem was SPAD (Set Program Access and Defaults). This gave users the ability to allow an application to try to reclaim it's once default behavior. SPAD simply allowed applications to run some registered code to get back to some state. SPAD was a big switch and set defaults for the entire computer. SPAD will still be available in Windows Vista to allow an administrator to configure the machine defaults and hide access, but will not be the primary defaults experience for users. In Windows Vista, we have provided a new set of functionality for applications to take advantage of. This new set of functionality is called "Default Programs". Default Programs was designed to help users make choices about their default behaviors. A large part of this is that defaults in Windows Vista and beyond will be primarily controlled at the Per User level instead of the Per Machine level. This allows much more flexibility for the multi-user computer environment that we believe is going to become the standard. Part of this is adding new centralized UI for the user, but the other part is giving ISVs the tools they need to help a user express choice. Default Programs gives an application:
This functionality was primarily designed for contentious applications. These are applications that want to be the default for file types like mp3 and jpeg, or protocols like http and mailto. Applications that primarily deal in their own protocols and file associations won't typically need to use this new functionality since they don't have to worry about other applications stomping over them. Applications that aren't contentious will behave and install like in XP. However, any application can take advantage of the new "Default Programs" work. "Default Programs" functionality is built into the operating system as a series of control panels and open APIs. For an application to use the control panels or APIs it needs to register at install time to be part of Default Programs by writing a specific schema. This will allow the application to show up in the Default Programs control panels so a user can restore the application's default file associations and protocols at any given time. Once an application has registered with Default Programs the application can take advantage of new functionality provided through APIs. Default programs provides APIs to:
The Default Programs work is intended to make it very easy to express user choice post-install and provide applications a simple framework to contend for defaults and claim them. Why Use Default ProgramsHigh-level points:
There is an obvious consumer gain for contentious applications using the Default Programs framework, but there is also a significant gain for the application to use Default Programs. Default Programs provides a rich UI experience for registered applications so it can really advertise to the user all the amazing things it can do. In addition, applications that are digitally signed with a URL will be able to display that URL and allow users to easily navigate back to its home website and see what other apps and enhancements the company offers. Using the new API set also significantly reduces the development cost for new applications. Almost all contentious applications monitor or check to see if they are not the default. Using the new API set this can be done in a single API call instead of crawling the registry like in previous versions of the OS. Using the new API set also helps applications correctly function in the new world with User Account Control (UAC). UAC is implemented by taking an administrator and making her look like a standard user to the system. This means that an administrator cannot normally write to HKLM in Windows Vista and beyond. This is done so processes cannot act on the administrator's behalf without her knowledge. Installation will typically always be elevated because there is an experience for that, but for applications that want to be able to claim defaults post-install, they need to claim the defaults on the per-user level instead of the per-machine level. Switching to the new API set does this automatically. Applications that try to claim per-machine defaults post-install will fail. The other strong reason for an application to rev to using Default Programs is to consistently achieve the desired results. File and protocol associations are derived from a hierarchical structure in the registry. Part of this structure dictates that per-user defaults will always be chosen over per-machine defaults. This means that if an application decided to build elevation points in their code to claim defaults by writing to HKLM like in XP, it would not always achieve the desired result. As soon as another similar application is installed and used default programs APIs that take per-user file and protocol associations, the previous application would no longer be the default because per-user defaults have a higher precedence. Default Programs UIDefault Programs has several pieces of UI. These pictures are not final pictures of what this experience will look like by the time Windows Vista ships, but they are a general walk through in functionality and understanding. Default Program UI flow: Figure 2. (Click on the image for a larger picture) Startmenu: Figure 3. (Click the image for a larger picture) Default Programs Control Panel Hub Page: Figure 4. (Click the image for a larger picture) Set a Default Program page: Figure 5. (Click the image for a larger picture) Only applications that have registered will show up in the list of applications. When an application registers a description value it will show up in the listbox on the right side. A description is required when registering. Figure 6. (Click the image for a larger picture) Restore defaults will reclaim all registered defaults for an application. Advanced will allow a user to choose specific defaults for an application. Note In order to show a URL in the UI an application must embed a URL in its digitally signed authenticode certificate. Applications that are not signed will not be able to show a URL. Advanced Figure 7. (Click the image for a larger picture) This view shows everything that the application has registered for and what application currently owns the default. There is a Windows public API that allows apps to call this window so applications no longer need to maintain file association UI. We recommend using this UI instead of creating custom UI. Default Programs Guidelines and Best Practices:Install Applications that install onto the operating system should keep installing the way they do in XP. In addition, an application will need to create their schema for default programs. Registering the new schema allows an application to take advantage of all the new functionality. Applications that just install like they did in XP will still function, but applications will need to register in order to take defaults post install. An application should do the following at install:
Post InstallFirst Run Experiences: Applications can choose to have a per-user first run experience. This is recommended. This is where an application should ask questions that refer to per-user choice. Applications should not have a per-machine first run. First run experiences should offer the user 2 main choices:
Accept defaults should call the Program Defaults API that claims all registered defaults for an application. This changes the default file association from a per-machine setting to a per-user setting. Customize settings should bring the user to the file association UI. Applications can programmatically call Windows file association UI for a specific application. This is the recommended approach. Defaults UI:Applications that choose to show Defaults UI should use the new Default Programs APIs to open an app centric version of file associations. Example for Litware Media player:
Figure 8. In this view, a user will see all the defaults a specific application has registered. A user will be able to see what an application owns, the current defaults, and change the default to the new application. On save, all updates will be committed and the window will be closed. On cancel, the window will be closed. This UI is provided so applications do not need to spend development resources for maintaining File association UI or worry about setting associations correctly. Checking if an Application Is the Default:Many applications like web browsers or e-mail clients have file and protocol associations that aren't commonly known to the user. Examples of these are things like HTTP:\ and Mailto:\. These applications typically do a check to see if they are the default when the application is invoked. Applications should check and see if they are the default through the new Default Programs API set. If the application is not the default, the application should present the user with UI that asks the user to:
Applications should also include a checkbox that is defaulted to checked that says the equivalent of "Tell me when <application> is not the default anymore". Applications should NOT automatically claim defaults without asking the user. Applications should implement #1 by calling the Default Programs APIs to reclaim all of the application's registered defaults. An example using Internet Explorer is: Figure 9. (Click the image for a larger picture) Registering with Default ProgramsDefault Programs functions by having each application explicitly register for what file associations and protocols they want to be considered for the default. This is done by registering the following schema in HKLM. Note that ApplicationDescription can be a string literal or a string resource reference. The latter allows MUI'ization.
Note These are pointers to apps that have registered for canonicals in HKLM\Software\RegisteredApplications
Note ApplicationDescription is required. However, ApplicationName is an optional entry that allows different type applications to point to the same .exe and show up as different names. Note In order to show a URL in the UI, an application must embed a URL in its digitally signed certificate. Applications that are not signed will not be able to show a URL. An example using Contoso Web Browser: Note This should be a DLL to allow for localization. HKLM\software\Contoso\WebBrowser\Capabilities Description =" The award-winning Web browser is better than ever. Search the internet in second and find anything you want. Use integrated tabs and new phishing detectors to enhance your internet experience." ProgIdsApplications need to provide Applications specific ProgIds. This should have all the information that is typically written into the default key. Applications can do a one-to-one mapping of progid to protocol/extension or do one-to-many. It is completely arbitrary and both methods work equally. In the example above, ContosoHTML points to a single progid that has the shellexecute information for htm, html, shtml, xht, and xhtml. For the protocols, a specific progid is defined per protocol. This allows the execution string to be different per protocol. When defining a ProgID for a MIME, the prog-id must contain the CLSID subkey with the class id for the corresponding application. This is used to do a lookup against the class id in the MIME database stored in HKLM. Definitions of valuesCapabilitiesThe registry subkey that all Default Programs information lives under for a specific application. The capabilities subkey is always under the applications registry keys. DescriptionDefault Programs is designed to allow users to make informed choices. We allow every application to register a description string so each application has a way to advertise its capabilities to the user. This value is a property under \capabilities. Note This is a required field. An application must provide an entry here to show up in the UI. Be sure to localize your strings. ApplicationNameSpecifies the name that will show up in the Default Programs UI. If this field is not filled out then default programs will use the name of the .exe associated to the first registered progid for the application. Application name should always match the RegisteredApplications name. FileAssocationsThe file associations subkey is where all the specific file associations the application wants to claim are put. Each file association is stored as a property of the FileAssocations Subkey. Each extension should point to an application specific progid and not a generic progid. UrlAssocaitionsThe URL associations subkey is where all the specific URL associations the application wants to claim are put. Each URL association is stored as a property of the UrlAssocations Subkey. Each protocol should point to an application specific progid and not a generic progid. MIMEAssocaitionsThe MIME associations subkey is where all the specific MIME associations the application wants to claim are put. Each mime association is stored as a property of the MIMEAssocations Subkey. The name should be the exact name of the MIME name stored in the MIME database and the value should be an application specific progid that has the corresponding CLSID in it. StartmenuThe startmenu subkey is for internet and e-mail slots that are on the start menu. Applications that also register to be a contender for those spots can link that functionality into their Default programs entry. Providing a link to the start menu registration allows an application to show that it also wants the corresponding e-mail or internet link when displayed in default programs. If this information is provided and the user restores the default to this program then it will also take over the startmenu spot. The registration should just be the name of the registered key under Note There is a separate start menu registration. For more information, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp HKLM\software\RegisteredApplicationsRegisteredApplications is required so the OS can know where all of the information about each application is stored. This should be the name of the application. Using Default Programs APIsOnce an application is registered, there are a number of APIs an application can take advantage of to allow for a better user experience. This interface should be in the June CTP. There is a slightly different interface in the Beta2 release that was changed due to customer feedback.
Note This is what most applications should use.
Pass in the string of the extension (.mp3, HTTP, etc), type of extension it is, association level and it will return the ProgID for the current default. Typically, applications should use the
Pass in the string of the extension (.mp3, HTTP, etc), type of extension it is, association level, and the registered application name and it will return a BOOL based on whether the application owns the default. Typically, applications should use the
Pass in the association level, and the registered application name, and it will return a BOOL based on whether the application owns all its registered defaults. Typically, applications should use the
Pass in the name of the registered app, the extension (.mp3, HTTP, etc), and the type of extension it is. The default will be set to the registered app.
Pass in the name of the registered app and it will set all the defaults registered to the application.
Deletes all per-user associations for the current user, returning that user to whatever per-machine defaults exist. There does not currently exist a defined partner or 3rd party scenario where we would expect anyone to call this. But if they wanted to, they should be able to.
The specified app registration name must match one of the values registered under
Note This API set is only available for Windows Vista and beyond. Applications supporting downlevel OSs (Windows XP, Windows 2000, and Windows 98) should use their pre-existing defaults code on those OSs by using a SKU check to differentiate between pre-Windows Vista and post-Windows Vista OSs. Code ExamplesUsing the registration for the Contoso Web browser, following is how it would implement using the API set. Querying if Contoso Web Browser owns all of its defaults:
Querying if Contoso Web Browser owns the default for .htm:
Setting Contoso Web Browser as the default for .HTM:
File Association DocumentationFor more information about Creating a File Association, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fileassoc.asp For more information about Registering Programs with Client Types, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_adv/registeringapps.asp For more information about Verbs and File Associations, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_verbs.asp For more information about File Types, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_basics/shell_basics_extending/fileassociations/fa_file_types.asp Program Compatibility Assistant (PCA) in Windows VistaIntroduction to PCAThe Program Compatibility Wizard in Help and Support and the Compatibility tab in file properties are useful tools for users to fix program compatibility issues in Windows XP. The major limitation with these tools is the discoverability and the fact that the user needs to know when to use these tools. The Program Compatibility Assistant (PCA) is a new feature in Windows Vista that can make older programs that have compatibility problems work better, in an automated manner. PCA monitors programs for known issues. If an issue is detected, it notifies the user of the problem and offers to apply solutions that will be effective before the user runs the program the next time. Note PCA is a client-only feature and is not available on the Server. The following sections describe the scenarios in which the user is expected to encounter PCA, details on the user experience, the solutions applied in each of those scenarios and how to manage the settings made by PCA at a later time. The last section talks about how to exclude programs from PCA. PCA ScenariosDetecting Failures in Setup ProgramsOne of the main scenarios for PCA is to detect setup programs failing to install on Windows Vista and to provide the solution of applying the Windows XP compatibility mode. The most common setup failure is due to installers hard coding the check for the Windows OS version that they can run on. These installers will typical fail with an error message saying that the current version of Windows is not supported and terminate. Below is an example of such error message, illustrated by a test program.
Figure 10. To give more details on this, programs commonly use GetVersion or the GetVersionEx APIs to get information on the Windows OS version that they are running on. In Windows Vista these APIs will return 6 as the major version. If the program is hard coded to look for the XP version, which is major version 5, then it will fail in Windows Vista. The XPVersionLie fix included in the Windows XP compatibility mode will provide the XP version of the OS to the program, when it calls GetVersion or GetVersionEx APIs. PCA targets to detect this scenario and will display a user interface similar to the one below after the installer is terminated. This scenario also covers uninstallers and a similar dialog will show be shown.
Figure 11. When the user selects the option to Reinstall using recommended settings, the WINXPS2 compatibility mode will be applied to the installer program and the installer will be automatically restarted. More details on what happens under the covers are explained through the Question / Answer below:
All these options will result in the PCA dialog to disappear. PCA will not show up again for the same setup program except when the user selected the 'cancel' option on the previous PCA dialog. Detecting program failures under UACThe second main scenario category for PCA is to detect program failures while running under User Access Control (UAC). PCA detects 3 different types of program failures under UAC, which are described below. Detecting program failures while trying to launch installersPCA detects this particular scenario of a program not running as administrator and is experiencing a failure while launching a child exe, because the child program is required to run as administrator. This will typically be the case for programs trying to launch an updater.exe. This is because Windows Vista returns a new error code to programs trying to launch an executable which is detected to run as administrator. If the same updater.exe is run from explorer it will run as administrator since explorer knows how to handle this error code and launch the UAC consent UI asking for administrator credentials or approval and finally run the program as administrator. Below is an example of a PCA dialog that will show up in this scenario, illustrated by a test program.
Figure 12. Here the test program was trying to launch an updater which is required to run as administrator and failed. In this case, PCA will apply the ELEVATECREATEPROCESS compatibility mode, which will enable the program to successfully launch the child exe as administrator the next time. Now when the program is run the next time and while trying to launch the updater, it will not fail and will successfully run as administrator. The user will see the UAC consent UI. More details on what happens under the covers is explained through Q/A below.
Detecting installers that need to be run as administratorOne of the tenants of Windows is that the installation of most software requires administrative privileges. This is because installed applications are loaded into system directories and manipulate system resources. Install detection feature part of the overall User Access Control (UAC) feature in Windows Vista aids in this by identifying setup programs and automatically prompting the user for administrator approval or credentials. In some cases it is possible that an install program may not be detected by UAC. These are typically custom made installers which are not built using any standard installer technologies like Install Shield, Microsoft Windows Installer, etc. PCA targets to detect this scenario and will display a user interface similar to the one below after the installer is terminated.
Figure 13. When the user selects the option to 'Restart the program as administrator', the program will be marked to run as administrator and will be automatically restarted. More details on what happens under the covers are explained through the Question / Answer below:
PCA will not show up again for the same program except when the user selected the 'cancel' option on the previous PCA dialog. Detecting legacy control panels that may need to run as administratorThe last UAC related scenario addressed by PCA is to detect control panel items that need to be run as administrator. After a legacy control panel item is run once, a PCA dialog similar to the one below will show up.
Figure 14. More details on what happens under the covers are explained through the Question / Answer below:
All these options will result in the PCA dialog to disappear. PCA will not show up again for the same control panel item except when the user selected the Cancel option on the previous PCA dialog. Detecting program failures due to deprecated Windows componentsThis PCA scenario targets to mitigate the impact on programs due to deprecated (removed) components in Windows Vista. PCA detects programs that are trying to access a DLL or a COM object removed in Windows Vista. If a program is detected to access a known DLL/COM object, PCA will show up an UI at the program termination to inform the user about the same and provide options to check online for a solution. Below is an example of a PCA dialog that will show up in this scenario, illustrated by a test program.
Figure 15. Here the test program was trying to use the COM objects associated with the DHTML editing control, which is removed from Windows Vista. More details on what happens under the covers is explained through Q/A below.
Detecting unsigned drivers on 64 bit platformThis is a scenario where PCA is trying to protect the system stability due to programs or devices using unsigned drivers on 64 bit platforms. Windows Vista does not support unsigned drivers on the 64 bit platform and enforces a policy that all drivers should be signed. If an unsigned driver is installed into the system with a 64 bit platform it will not be loaded. After the user reboots the machine, the system will not start if it a boot time driver. The device or program trying to use the driver may experience failures which may also result in a system crash. In order to prevent this, PCA monitors installation of unsigned drivers and whenever PCA detects installation of an unsigned driver it will notify the user as shown below.
Figure 16. If it is a boot time driver it will disable the driver so that the system will be able to boot. The detection for this scenario is accomplished by PCA monitoring changes to the KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry key for addition of new drivers into system first. Then, based on the location of driver from the registry, each new driver installed will be checked for a valid digital signature. If the driver is found not to have a valid signature, PCA dialog will show up. Unlike the other PCA scenarios this message is not related to specific applications and is related to the driver irrespective of how it was installed. Inform Users About Compatibility Issues with Known Programs at StartupApart from the runtime issue detection scenarios listed above, PCA also includes a scenario to come up at program startup for the list of programs known to have compatibility issues. The list will be stored in the System application compatibility database. This scenario existed from Windows XP and these messages are known as the Application Help (shortly apphelp) messages. This is the only PCA scenario that is also available on Server. There are two types of apphelp messages. If the program is known to be incompatible and if allowing the program may result in severe impact to the system (for example, a stop error or unable to boot after the install, etc.) then a blocking message as shown below will be displayed. Note Microsoft gets approval from the ISVs for programs being blocked.
Figure 17. The other type of message is a non blocking message similar to the one below. This will be used in the case of programs that have known compatibility issues but the impact is not severe to the system.
Figure 18. In both cases, Check for solutions online sends a Windows Error Report to get an online response from Microsoft. The responses will be displayed in the client Solutions to Problems (wercon.exe) UI. Typically the responses will be of 3 types:
Managing Settings Made by PCAThe compatibility modes will be applied to programs by setting a registry key under The registry key will be set under HKEY_LOCAL_MACHINE to apply the solutions to be effective for all users except for the scenario where the ELEVATECREATEPROCESS compatibility mode is applied automatically before the PCA dialog shows up. In that scenario, the registry key will be set under HKEY_CURRENT_USER and the solution will be effective only for the current user. Apart for this key, PCA stores the list of all programs for which it came up under the follow key for each user even if no compatibility modes where applied (e.g., in the case user reported that the program worked correctly).
Excluding Programs from PCAPCA is intended to detect issues with older programs and not intended to monitor programs developed for Windows Vista. The best option to exclude a program from PCA is to include, with the program, an application manifest with run level (either admin or as limited users) marking for UAC. This means the program is tested to work under UAC (and Windows Vista), and PCA checks for this manifest and will exclude the program. This applies for both installer and regular programs. For more information about UAC and how to create this UAC manifest, see Developer Best Practices and Guidelines for Applications in a Least Privileged Environment. Another option to exclude apps from PCA is to add the list of .exes with full path under the following registry key: Apart from this, PCA automatically excludes programs running from network locations and programs containing fixes applied to them in the application compatibility databases. A group policy setting is provided to disable PCA for all programs if required. The name of the policy is Turn Off Program Compatibility Assistant and can be found under Administrative Templates -> Windows Components -> Application Compatibility There are also individual policies to turn off specific scenarios. These policies are available under Administrative Templates -> System -> Troubleshooting and Diagnostics -> Application Compatibility Diagnostics Event loggingAfter the user has acted on PCA an event will be logged in the event log. The events can be found under Application and Services Logs -> Microsoft -> Windows -> Program Compatibility Assistant -> Operational
Managing Apphelp MessagesAn IT Professional in an enterprise can use the Compatibility Administrator tool to disable the apphelp entries present in the System application compatibility database or add custom databases that contain apphelp messages for programs in their enterprise. The Compatibility Administrator tool ships as part of the Application Compatibility Toolkit. For more information about the Toolkit, see Application Compatibility Tools. Graphical Device Interface (GDI)Painting (WM_PAINT) Behavior DifferencesFeature ImpactLow Brief DescriptionAs part of the Desktop Window Manager work, Microsoft has made subtle but important changes to the way applications paint to the screen. Prior to Windows Vista, an ManifestationBlack areas around tool tips, pop-up menus, balloons, splash screens, etc. This can happen when the application has not painted the entire hwnd, usually because that application assumed that the pixels in the background windows are good enough. This is an area Microsoft is actively working on, so don't overly optimize based on current bits but please give us the feedback. Flashes of black
A related issue happens when applications do painting that's not part of a WM_PAINT. USER detects the application is drawing and redraws the desktop, but the application may not have finished drawing the
Glass disabled for application This can happen when an application draws to the non-client area of the window (the title bar). Rubber bands, custom shadows, and other special effects These are often done using Improved Far East fonts Windows Vista has made numerous changes to the Chinese, Japanese and Korean fonts to make them more readable; one of the side effects is that text can layout slightly differently in these new fonts as characters may have different widths. Consider testing how your text lays out on the screen and on the printer. Also consider testing places where Far East languages can be mixed with Latin character sets (for example, English). Rendering PerformanceFeature ImpactLow Brief DescriptionMost applications will run as fast or faster on Windows Vista, but there are some changes that may require monitoring. ManifestationOverall GDI drawing performance is slower? GDI primitives like Slower text rendering?
Calls such as
Reduced application address space? The bitmap for a top-level window is stored in the application's address space (see section on painting), potentially reducing available address space by a few megabytes. Reading from and writing to This operation is slower than previous versions of Windows because applications now render to an offscreen bitmap rather than directly to the screen. Where possible, consider drawing to an UIPI (GUI Portion of User Account Control)Feature ImpactLow Brief DescriptionAs an added layer of defense against malicious software, Windows Vista allows different UI applications to run with three different levels of UI privilege. Applications can freely interact with other applications of the same and lower permission, but can't modify or talk to applications of higher permission. Most applications will run with the middle permission, while applications that require administrator privileges run in a higher mode, and restricted processes such as low rights Internet Explorer use the lowest privilege mode. More specifically, applications in lower privilege modes cannot generally send messages to higher privileged applications unless the higher privileged application explicitly allows that message by calling ManifestationApplications that interact with other applications stop doing so. Utilities that reposition windows, type keystrokes for you, add extra buttons to windows, etc. Cut and paste between different applications fails. Does it work at all, and does it support all the different clipboard formats you expect (rich text, HTML, etc.)? RemediesJournaling hooks
For programs you have the source code to, consider reviewing any code that uses the following APIs, as they often indicate cross-process stuff:
That's not an exhaustive list, nor is it a guarantee of anything that needs to change, but it's a good balance of finding issues versus minimizing false positives. You can search source files with High DPI ScalingFeature ImpactLow Brief DescriptionOn systems using the high DPI setting, applications that don't natively understand high DPI will be automatically scaled up. ManifestationPixel sizes have been roughly constant for a long time, but LCD manufacturers are increasingly coming out with monitors with smaller and smaller pixels, also known as high dots per inch (DPI). If an application uses the same number of pixels on a high DPI screen as it does on a standard 96 DPI screen, the application will look really small. Windows Vista introduces the ability to scale applications that were written for 96 DPI screens, which it does by rendering the application's bitmap at a larger size. Like all bitmap scaling, this can result in some blurriness, but otherwise gives a correctly sized and properly rendered image. Applications can also decide to support high dpi natively, which will give the crispest possible look. Currently an application can turn off scaling & declare itself DPI-aware by calling The rest of this section talks about potential problems with non-DPI aware applications. Applications ask Windows questions like "how many pixels wide is a scrollbar", so when a 96 DPI application asks, Windows Vista gives the application the 96 DPI answer. There are, however cases where Windows doesn't provide an answer based on the application, usually because Windows Vista doesn't yet have enough information (please give us this feedback), and sometimes because the "right" answer depends on what the application is trying to do with the answer. (Screen coordinates often raise this problem.) Most compatibility problems come from these imperfect conditions. Things to look for when testing:
RemediesFor more information about writing applications that natively support high DPI, see http://msdn.microsoft.com/library/en-us/dngdi/html/highdpiapp.asp. PNG IconsFeature ImpactLow Brief DescriptionThe icon file format (*.ico) now supports PNG images in addition to the older BMP-style icons; many Windows Vista icons use the PNG variant. ManifestationApplications that view or edit icon files may not understand the new format. Linkshttps://blogs.msdn.com/nickkramer/archive/2006/04/24/582365.aspx. (This information is an addendum to the article you are reading.) Named Pipe HardeningBrief DescriptionIn Windows Vista, many services are running under lesser privileged accounts like NetworkService (NS) or LocalService (LS) rather than Local System. Service hardening is an initiative to improve the compartmentalization between the services such that if one service is compromised, it cannot easily attack other services on the system. Windows Vista hardens the named pipes used by RPC servers to prevent other processes from being able to hijack them. Under Windows XP, an RPC server creates a named pipe and the ACL on the pipe grants LocalService or NetworkService Full Control. This includes the ability to create "server instances" of the pipe, so clients can connect. The only process that should create instances of a pipe is the process that initially created the pipe. Microsoft's ACL change restricts the ability to create server instances to the process that created the pipe initially. ManifestationThe following services have been affected: services that run as LocalService or NetworkService, services that opt-in to using service Sids, and services using RPC over named pipes that request the "default" named pipe security descriptor. Services that opt-in to using service Sids means no 3rd-party service will be affected by default. Service Sids is a new feature in Windows Vista that you have to opt-in by setting a DWORD in your service configuration. When developers opt-in they have the opportunity to test with the new service hardening behavior. This change would be one of those behaviors. Services using RPC over named pipes that request the "default" named pipe security descriptor means that if some RPC server is specifying a custom security descriptor because of special needs, they will see no change. Below is a list of the affected Pipes:
SPAP Deprecation (Pstore)Brief DescriptionProtected Storage (PStore), which provides applications with an interface to store user data that must be kept secure or free from modification, has been changed to read-only in Windows Vista. This means that any application that tries to create new PStore data items will fail. RemediesUse DPAPI for future PStore procedures. For more information about the existing PStore items and use of DPAPI to manage them, see http://msdn.microsoft.com/library/en-us/dnsecure/html/windataprotection-dpapi.asp?frame=true WMI Providers: Default Security Hosting ModelBrief DescriptionThe Default In previous releases of Windows (Pre-Windows Vista Beta 2), if the For most cases, ManifestationIf a WMI provider lacks a definition for hosting model and executes as if it is running under the RemediesThe expected hosting model must be changed to ensure that the WMI provider code performs the operations in the client security context by impersonating the WMI client. Cases that require the LinksVolume Shadow Copy ServiceBrief DescriptionThe Volume Shadow Copy Service (VSS) is a new service that was introduced in Windows XP and Windows Server 2003. It is a framework facilitating communication between applications, storage subsystems, and storage management applications (including backup applications). This service defines, persists and exploits point-in-time copies of storage data. ManifestationCompatibility with XP backup applicationsSeveral interfaces have changed since XP and the libraries are not compatible with Windows Vista. At a minimum, the application will need to be recompiled using either headers or libraries from VSS SDK 7.2 or from the Platform SDK released with Windows Vista Beta 2. Compatibility with 2K3 SP 1 backup applicationsBinaries from 2K3 SP1 are compatible with Windows Vista. Most backup applications would also need to account for the changes in the inbox writers, file and registry virtualization, WRP as well as the use of hard links in Compiling backup applications for Windows VistaApplications that use interfaces available in Server 2003 can be compiled using the headers and libs provided in VSS SDK 7.2. To use new interfaces specific to Windows Vista, recompile using the VSS headers and libs included in the Platform SDK for Windows Vista. The first release of the SDK containing VSS components will be with Beta 2. VSS writers in Windows VistaRegistry WriterThe Registry Writer now performs in place backups and restores of the Registry as compared to the spit writer scheme earlier. User hives are not reported by the Registry Writer. COM+ RegDB WriterThis backs up the contents of MS Search WriterThis deletes the search index from shadow copies after creation. MSDE WriterThis is the default writer for SQL 2000 and SQL 2005 databases. WMI WriterWMI VSS writer is used for backing up WMI specific states and data during backup operations. The data includes files from the WBEM Repository and requires Registry Backup. Background Intelligent Transfer Service (BITS) WriterThis uses the Automated System Recovery (ASR) WriterThe ASR Writer stores the configuration of the disks on the system. System WriterOn Windows Vista the System Writer will generate a list of files using the following formula:
The files in The restore app is responsible for laying down files and registry and setting ACLs to match the system snapshot. The appropriate hard links must also be created. Microsoft Optimization WriterThis writer deletes certain files from the snapshots. The file deletions minimize Copy On Write (COW) I/O during the snapshot maintenance phase and the files are typically temporary files or those that do not constitute user or system state. Linkshttp://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=Volume+Shadow+Copy+Service Standard User AnalyzerThe "Standard User Analyzer" (previously known as the "LUA Analyzer") is a tool to help independent software vendors (ISVs), IT professionals, and users diagnose possible issues in an application when it is running as a standard user. The Standard User Analyzer is based upon the "LUA Predictor" technology, which is part of the Microsoft Application Verifier. Installation Prerequisites and CompatibilityOperating systems: Windows Vista, Windows XP, and Windows Server 2003. Note Currently, only a 32-bit version of the Standard User Analyzer is available. Installation prerequisites: The Application Verifier must be installed before the Standard User Analyzer installation is launched. The Application Verifier is a free download on the Microsoft Web site. InstallationTo install the Standard User Analyzer, run the SUAnalyzer.msi file. All Standard User Analyzer files are installed to the "Program Files\Standard User Analyzer" folder. Note The Standard User Analyzer requires you to install latest Application Verifier. Use the Standard User Analyzer to diagnose standard user compatibility issues within an application. Note The Standard User Analyzer should be run on a Windows Vista computer to properly identify an application's standard user compatibility issues. The following procedure is written to be performed by a standard user on a Windows Vista computer.
Note The SUAnalyzerSrv.exe process may request elevation while performing this procedure. This process is a backend process that is responsible for managing tasks that require an administrator access token, such as changing settings in the Application Verifier. During the test, the Standard User Analyzer will launch the application, monitor its actions, and wait for the application to be closed. The Standard User Analyzer will then generate and parse a log for the application, which might take some time to complete. Once the log has been generated and parsed, click on individual tabs to view specific issues found by Standard User Analyzer. Interpret the Standard User Analyzer Test Data
When you click on an issue in any individual tab, the lower left panel of Standard User Analyzer will display all related records from the log file. You can then click on any record, and the lower right panel will display the detailed information for that record, including a formatted message, parameters, and the stack trace. ISVs can use stack trace data to track down the problem in the application's source code. Standard User Analyzer Main MenuFile menuOpen Log File: load a saved log file. Export Log File: save current log file. View Raw Log File: open the current log file in raw xml format. (Warning: if the file is big, it will take a long time to open.) Exit: exit the program. View menuChoose what kinds of messages you want to display. Usually it is necessary only to view "error messages". Options MenuFilter Noise: Toggle between display/hide entries that are "noisy". Load Noise Filter File: Load a noise filter file. Export Noise Filter File: Save a noise filter file. Only Display Records with Application Name in StackTrace: This will reduce the noise; however, since the Standard User Analyzer captures only the first 32 stack frames, enabling this option might filter out real issues if a call stack is deeper than 32 frames. Logging: Logging options. It is recommended that you leave the "Log Information" checkbox unselected in order to keep the log file from getting too large. Help Engine SupportCompatibility RisksDeprecated ComponentsThe following components from earlier Windows releases will not be present in Windows Vista: Windows Help for 32-bit applications (WinHlp32.exe) is being deprecated for Windows Vista. Windows Help is not supported in Beta 2 and some of the Windows Help code has been removed for the release. To view 32-bit Help files with the .HLP file name extension in Windows Vista, you will need to download and install Windows Help from the Microsoft Download Center. This download will not be available for Beta 2 or RC1. For more information, see Help Engine Support. Note HTML Help and .CHM files will continue to be supported for Windows Vista. See "Help Engine Support" (next in this document) for further information. Help Engine SupportMicrosoft is committed to providing Help and Support technology in the Windows Platform and will continue to investigate new solutions for software developers. The following information clarifies the support in Windows Vista for four Microsoft Help technologies: Windows Help, HTML Help 1.x, the Help and Support Center, and the Assistance Platform client. Windows Help (WinHelp.exe & WinHlp32.exe)Windows Help WinHlp32.exe is a help program that has been included with Microsoft Windows versions starting with the Microsoft Windows 3.1 operating system. The Windows Help program (WinHlp32.exe) is required to display 32-bit help content files that have the .HLP file name extension. Windows Help is being deprecated for Windows Vista. To view 32-bit Help files with the .HLP file name extension in Windows Vista, you will need to download and install WinHlp32.exe from the Microsoft Download Center. This download is not available for Beta 2 or RC1. Microsoft strongly recommends that software developers discontinue using the Windows Help application in Vista. Software developers who ship programs that rely on .HLP files are encouraged to transition their Help experience to an alternative Help file format, such as CHM, HTML, or XML. You will also need to change your calls from the WinHelp() API to the new content source. Several third-party tools are available to assist authors in converting content from one format to the other. HTML Help 1.x (HH.exe)Microsoft HTML Help 1.x (HH.exe) is a Help system included in Windows releases starting with Windows 98. HTML Help is required to display compiled Help files with the .CHM file name extension. HTML Help will ship in Windows Vista. However, only critical updates to the engine will be made. No new features or feature improvements will be added to the HTML Help engine for Windows Vista or future Windows releases. For more information about the functionality of HTML Help and guidance on authoring files for HTML Help, see the HTML Help 1.4 SDK. Help and Support Center (HelpCtr.exe)The Help and Support Center (HelpCtr.exe) was a Help application designed for Windows XP and Windows Server 2003. The Help and Support Center displayed compiled Help files with the .CHM file name extension. The Help and Support Center is not included in Windows Vista and its features are not supported. Compiled Help files with the .CHM file name extension will only be displayed in the HTML Help application as described above. Assistance Platform client (HelpPane.exe)The Assistance Platform client (HelpPane.exe) is a new Help engine designed for Windows Vista. It is not compatible with any previous versions of Windows. The Assistance Platform client is required to display Help files with the .H1S file name extension. In Windows Vista, the Assistance Platform client can be customized by OEMs, system builders, and enterprise customers under license agreement, but cannot be used by third-party programs. For more information on customizing the Assistance Platform client, see the Windows SDK. Junction Points and Backup Applications in Windows VistaIn Windows Vista and Longhorn Server the default location of user data has changed. An example of this change is the documents and Settings directory. It was moved from "%systemdrive%\Documents and Settings" to "%systemdrive%\Users". To enable interoperability with legacy apps junction points are used at the deprecated locations and point to the new locations in Windows Vista. For example C:\Documents and Settings is now a junction point which points to C:\Users. Backup application in Windows Vista and Longhorn must be capable of restoring junction points. These junction points have file attributes of FILE_ATTRIBUTE_REPARSE_POINT & FILE_ATTRIBUTE_SYSTEM and the ACLs are set to "Everyone Deny Read". Applications must have permissions in order to call out and traverse a specific path. However, enumerating the contents of these junction points is not possible. Classes of Junction PointsThere are two Categories of Directory junctions that can be created by profiles for application compatibility in Windows Vista.
Parent Folder Junction requirements:
User Data Legacy Folder Junction requirements:
Per User Application Data Legacy Folder Junction requirements:
Per User OS Settings Legacy Folder Junction requirements:
Legacy Profile folders where Junctions are not required:
All Users Legacy Folder Junction requirements:
Default Users Legacy Folder Junction requirements:
Application Compatibility: Notes for Backup and Recovery in Windows Vista and Longhorn ServerIntroductionThere as several changes in Windows Vista and Windows Vista Server that affects the compatibility of backup applications. This document addresses those issues and specific requirements concerning those changes. It is intended for backup application developers who are familiar with the Volume Shadow Copy Service (VSS) infrastructure and Windows backup procedures. Some of these features or changes may not be an issue, but vendors should verify that they are not impacted or that they have suitable mitigations in place. This document does not get into exhaustive details of the features and touches primarily on the impact to backup tools. For details on a specific topic follow the links listed at the end of this document or look on MSDN. Compatibility with Windows XP backup applicationsSeveral interfaces have changed since Windows XP and those libraries are not compatible with Windows Vista. At a minimum applications will need to be recompiled using either headers or libraries from the Microsoft Volume Shadow Copy Service SDK 7.2 (VSS SDK 7.2) or from the Windows Vista Platform SDK. Compatibility with Windows Server Service 2003 Service pack 1 backup applicationsBinaries from Windows Server 2003 SP1 are compatible with Windows Vista. Most backup applications would also need to account for the changes in the inbox writers, file and registry virtualization, WRP as well as the use of hard links in %windir%system32. Therefore these changes will need to be addressed for Windows Server 2003 SP1 backup applications to function under Windows Vista. Compiling backup applications for Windows VistaApplications that use interfaces available in Windows Server 2003 can be compiled using the headers and libs provided in VSS SDK 7.2. In order to use new specific Windows Vista interfaces, the user would need to compile the application using VSS headers and libraries included in the Platform SDK for Windows Vista. Note that Binaries compiled using Windows Vista headers and libraries will not run on Windows Server 2003. In box Volume Shadow Copy Service (VSS) writers in Windows Vista
Interoperability with TransactionsWindows Vista includes support for transactions and VSS ensures that both the Kernel Transaction Manager (KTM) and Distributed Transaction Coordinator (DTC) are frozen prior to the creation of snapshots. This leads to two new timeout errors:
In case the requestor receives either of these errors it must retry snapshot creation. Registry and file system operations may also be transacted. In the case of the registry, the registry writer ensures transactional consistency. Transactional consistency of NTFS operations is ensured by mounting the shadow copy read/write after creation and then rolling pack partially committed operations. Search the InternetOverviewWindows Vista has a new feature that allows users to easily search the internet from the start menu. This works by the user clicking on the "Search the internet" option after entering text into the start menu search bar. To implement the "search the internet" feature Windows Vista invokes the application that is the default for the HTTP:// protocol and appends an argument with the search term. Extensibility Below outlines how an application can correctly handle being invoked from search the internet feature. Windows Vista enables users to launch an Internet Search directly from the Start Menu search box.
Figure 19. When a user clicks on the "Search the Internet" link (see Figure 19), Windows Vista determines the default program for the http protocol by calling the AssocQueryString function with the following parameters:
where Windows Vista then calls
Figure 20. It is up to each browser to determine what to do with the passed parameter. The recommended way to handle the parameter is to pass the search string directly to the browsers default search handler. For example, in Figure 20, Windows Vista has launched the Internet Explorer browser with the search term "Hello World". Internet explorer passes the term directly to the default search handler for Internet explorer. Any browser can take advantage of this functionality. For example, assume that the Contoso Internet Browser has been registered as the default http protocol handler. The executable for this browser is located at C:\Program Files\Contoso\contoso.exe. A call to Browsers that want to be able to handle this correctly need to make sure its executable can handle being passed an argument with quotations that is pre-pended with a question mark. Below are 2 examples of an executable handling the search parameter being passed. Internet Explorer:
Contoso Browser:
See Also |