Porting applications to Windows Vista: Difference between revisions

From Yggenyk
Jump to navigation Jump to search
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:English pages]]
[[Category:English pages]]
[[Category:Vista tips and tricks]]
[[Category:Software development]]
<google>ENGELSK</google>


==Program Compatibility Assistant==
==Program Compatibility Assistant==
* [http://blogs.msdn.com/b/cjacks/archive/2011/11/22/managing-the-windows-7-program-compatibility-assistant-pca.aspx Managing the Windows 7 Program Compatibility Assistant (PCA)]
* [http://windowshelp.microsoft.com/Windows/en-US/Help/82c0440d-553e-47e9-b4bd-6c2d10df4de71033.mspx Program Compatibility Assistant: frequently asked questions]
* [http://windowshelp.microsoft.com/Windows/en-US/Help/82c0440d-553e-47e9-b4bd-6c2d10df4de71033.mspx Program Compatibility Assistant: frequently asked questions]
* [http://technet2.microsoft.com/WindowsVista/en/library/131b8838-e550-4deb-b43c-ba206f13bb2f1033.mspx?mfr=true Program Compatibility Features and Resulting Internet Communication in Windows Vista]
* [http://technet2.microsoft.com/WindowsVista/en/library/131b8838-e550-4deb-b43c-ba206f13bb2f1033.mspx?mfr=true Program Compatibility Features and Resulting Internet Communication in Windows Vista]
* [http://blogs.msdn.com/astebner/archive/2007/05/17/2705372.aspx How to prevent the Program Compatibility Assistant from appearing on Windows Vista]
* [http://blogs.msdn.com/astebner/archive/2007/05/17/2705372.aspx How to prevent the Program Compatibility Assistant from appearing on Windows Vista]
* [http://blogs.msdn.com/astebner/archive/2007/05/08/2491743.aspx Why does .NET Framework 3.5 beta 1 setup tell me to install Windows XP SP2 on Vista?]
* [http://blogs.msdn.com/astebner/archive/2007/05/08/2491743.aspx Why does .NET Framework 3.5 beta 1 setup tell me to install Windows XP SP2 on Vista?]
This Program Compatibility Assistant information is stored in the registry, look for the name of the EXE file in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
If the application has a manifest with a [http://msdn.microsoft.com/en-us/library/dd371711(VS.85).aspx Compatibility] section stating it supports Windows 7 (<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>), the Program Compatibility Assistant PCA, won't be active.


==The Windows Vista and Windows Server 2008 Developer Story: Application Compatibility Cookbook==
==The Windows Vista and Windows Server 2008 Developer Story: Application Compatibility Cookbook==
Line 32: Line 42:
#This program has been blocked
#This program has been blocked
* [http://windowshelp.microsoft.com/Windows/en-US/help/0eeb9ddd-ddaa-4cc5-a092-9908305665471033.mspx What is User Account Control?]
* [http://windowshelp.microsoft.com/Windows/en-US/help/0eeb9ddd-ddaa-4cc5-a092-9908305665471033.mspx What is User Account Control?]
* [http://technet2.microsoft.com/WindowsVista/en/library/00d04415-2b2f-422c-b70e-b18ff918c2811033.mspx?mfr=true Understanding and Configuring User Account Control in Windows Vista]
'''WARNING .exe with manifests for Vista might give Blue screen on XP !!!'''
* [[Bug in XP causes blue screen if embedded manifest has duplicate xmlns tag]]
* [http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=463884&SiteID=1 MSDN thread about Manifest files for Vista]
* [http://support.microsoft.com/kb/921337 The computer may restart when you add a manifest that has the Windows Vista extension to an .exe file or to a .dll file in Windows XP Service Pack 2 (SP2)]
* [https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=258108 FEEDBACK MT.EXE from VS2005 SP1 and Vista SDK have same version number]
Watch this video to learn to embed manifests in applications to avoid Vista auto detecting what kind of application it is.
* [http://channel9.msdn.com/Showpost.aspx?postid=211271 How To: Tell Vista's UAC What Privelege Level Your App Requires]
* [http://channel9.msdn.com/Screencasts/211271_Embedding%20a%20Manifest%20edited%20final_100k.wmv Right click and select ''Save Target As...'' to download video in highres]
Watch this video to learn how to run an application without Admin Rights and only require Elevation when necessary.
* [http://channel9.msdn.com/Showpost.aspx?postid=209647 How To: Use Vista's UAC Feature To Avoid Always Requiring Admin Rights]
* [http://channel9.msdn.com/Screencasts/209647_UAC%20Elevation%20Factoring_100k.wmv Right click and select ''Save Target As...'' to download video in highres]
Use this tool to check what manifests is inside your .exe file.
* [http://www.microsoft.com/technet/sysinternals/Security/Sigcheck.mspx Sigcheck v1.4 By Mark Russinovich]




* [http://channel9.msdn.com/Screencasts/211271_Embedding%20a%20Manifest%20edited%20final_100k.wmv Video showing how to embedd manifests in applications to avoid VIsta autodetecting what kind of application it is]
* [http://channel9.msdn.com/Showpost.aspx?postid=209647 If the link above fails use this instead]
* [http://msdn2.microsoft.com/en-us/library/aa905330.aspx The Windows Vista and Windows Server 2008 Developer Story: Windows Vista Application Development Requirements for User Account Control (UAC)]
* [http://msdn2.microsoft.com/en-us/library/aa905330.aspx The Windows Vista and Windows Server 2008 Developer Story: Windows Vista Application Development Requirements for User Account Control (UAC)]
* [http://www.tweak-uac.com/programming/vista-tools/ Vista tools - TweakUAC]
* [http://www.tweak-uac.com/programming/vista-tools/ Vista tools - TweakUAC]
* [http://blogs.msdn.com/cjacks/archive/2006/10/09/How-to-Determine-if-a-User-is-a-Member-of-the-Administrators-Group-with-UAC-Enabled-on-Windows-Vista.aspx How to Determine if a User is a Member of the Administrators Group with UAC Enabled on Windows Vista]
* [http://blogs.msdn.com/cjacks/archive/2006/10/09/How-to-Determine-if-a-User-is-a-Member-of-the-Administrators-Group-with-UAC-Enabled-on-Windows-Vista.aspx How to Determine if a User is a Member of the Administrators Group with UAC Enabled on Windows Vista]
* [http://www.microsoft.com/technet/technetmag/issues/2007/06/UAC/default.aspx?wt.svl%3dwhatsnew&pf=true Inside Windows Vista User Account Control - Mark Russinovich]
* [http://www.microsoft.com/technet/technetmag/issues/2007/06/UAC/default.aspx?wt.svl%3dwhatsnew&pf=true Inside Windows Vista User Account Control - Mark Russinovich]
* [http://www.codeproject.com/vista-security/MakingAppsUACAware.asp?df=100&forumid=395212&exp=0&select=2063941 CodeProject Making Your Application UAC Aware]
* [http://blogs.msdn.com/cheller/archive/2006/08/24/how-to-embed-a-manifest-in-an-assembly-let-me-count-the-ways.aspx How to embed a manifest in an assembly: let me count the ways...]
==UAC and network shares==
* [http://support.microsoft.com/kb/937624/ After you turn on User Account Control in Windows Vista, programs may be unable to access some network locations]
==Services is isolated in Session 0==
* [http://www.microsoft.com/whdc/system/vista/services.mspx Impact of Session 0 Isolation on Services and Drivers in Windows Vista]
==MT.EXE Versions!==
* [http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=258108 MT.EXE from VS2005 SP1 and Vista SDK have same version number]


==Folder and registry changes in Vista and Vista x64==
==Folder and registry changes in Vista and Vista x64==
Line 58: Line 100:
* [http://blogs.msdn.com/astebner/archive/2007/01/09/problems-with-custom-actions-that-depend-on-the-visual-c-8-0-runtime-files-on-windows-vista.aspx Problems with custom actions that depend on the Visual C++ 8.0 runtime files on Windows Vista]
* [http://blogs.msdn.com/astebner/archive/2007/01/09/problems-with-custom-actions-that-depend-on-the-visual-c-8-0-runtime-files-on-windows-vista.aspx Problems with custom actions that depend on the Visual C++ 8.0 runtime files on Windows Vista]


==Control Panel Items==
* [http://msdn2.microsoft.com/en-us/library/aa969284.aspx Control Panel Items]
<google>ENGELSK</google>
<google>ENGELSK</google>
==Default Programs in Vista==
* [http://msdn2.microsoft.com/en-us/library/bb776873.aspx Registering an Application for Use with Default Programs]
==If you need a test environment you can run Windows Vista for free without activating for 120 days==
[[Run Windows Vista for free without activating for 120 days]]

Latest revision as of 12:08, 29 February 2012

<google>ENGELSK</google>

Program Compatibility Assistant

This Program Compatibility Assistant information is stored in the registry, look for the name of the EXE file in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted

If the application has a manifest with a Compatibility section stating it supports Windows 7 (<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>), the Program Compatibility Assistant PCA, won't be active.

The Windows Vista and Windows Server 2008 Developer Story: Application Compatibility Cookbook

Application Compatibility Additional Resources

Microsoft Application Compatibility Toolkit

Application Verifier

Application Verifier uses the key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution

to take control over the application when it starts.

Programming against UAC

When your permission or password is needed to complete a task, UAC will alert you with one of the following messages:

  1. Windows needs your permission to continue
  2. A program needs your permission to continue
  3. An unidentified program wants access to your computer
  4. This program has been blocked

WARNING .exe with manifests for Vista might give Blue screen on XP !!!


Watch this video to learn to embed manifests in applications to avoid Vista auto detecting what kind of application it is.


Watch this video to learn how to run an application without Admin Rights and only require Elevation when necessary.


Use this tool to check what manifests is inside your .exe file.


UAC and network shares

Services is isolated in Session 0

MT.EXE Versions!

Folder and registry changes in Vista and Vista x64

Locating Debug Symbols

Add the environment variable:

_NT_SYMBOL_PATH=SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols

Full syntax off _NT_SYMBOL_PATH:

Registry Virtualization

Installer issues (MSI)

Control Panel Items

<google>ENGELSK</google>

Default Programs in Vista

If you need a test environment you can run Windows Vista for free without activating for 120 days

Run Windows Vista for free without activating for 120 days

id=siteTree