How to Move Your Windows XP Application to Windows 7

38DF6AB1-13D4-409C-966D-CBE61F040027Yochay Kiriaty has put together a series of posts to help you move your Windows XP application to Windows 7 on the Windows Team for Developers blog. The series began with Is Your Application Ready for Windows 7 RTM? and continues with User Account Control Data Redirection. Other posting are promised. But these two provide the keys to most issues.

With general availability of Windows 7 coming on October 22, now is the time to move those Windows XP applications to Windows 7.  Almost all applications that run under Windows Vista will work well with Windows 7. 

But what should you look for in those applications that just run on Windows XP or earlier?

Seven Areas

The Windows Vista Application Compatibility Cookbook is still very relevant for Windows 7, as 99% of its topics apply to Windows 7. Kiriaty explains seven areas represent about a large number of the reported application compatibility problems and provides links to more in depth solutions.

For more information, see Is Your Application Ready for Windows 7 RTM?

User Account Control Data Redirection

Many XP applications are still designed to write files to the Program Files, Windows directories, or system root (typically the C drive) folders. Some applications update registry values, often in HKLM/Software. But the files or registry values are not created or updated.

Prior to Windows Vista, administrators typically ran applications. As a result, applications could freely read and write system files and registry keys. If standard users ran these applications, they would fail due to insufficient access.

Kiriaty’s posting, User Account Control Data Redirection, describes the symptoms that you’ll see in your applications when you run as a standard user in Windows Vista or Windows 7 and the remedies.

When updating existing code to run on Windows 7, you should:

  • Ensure that during run-time, applications store data only in per-user locations or in computer locations within %alluserprofile% that have properly set access control list (ACL) settings. For more information about ACLs, see Access Control Lists.
  • Determine the known folder to which you want to write the data files. Generic data used by all users should be written to a global public location that is shared by all users. All other data should be written to a per-user location.
  • Ensure that you do not hard-code paths once you have determined the appropriate locations. Instead, use one of the following programming models and APIs to retrieve the correct paths of specific Windows known folders.

The posting goes on to explain the five tests you can use to test your application on Windows Vista or Windows 7. It also describes what you can do in your code.

For more information, see User Account Control Data Redirection. Also, you can download Data Redirection that includes a presentation describing UAC Virtualization, and two full hands on labs on this topic, one for managed code and one for native code.

Front Runner

ISVs in the United States can join Front Runner to declare your application is ready.

frontrunnerlogo Sign up for the new Windows 7 and Windows Server 2008 R2 Front Runner program. Front Runner is an early adopter program for ISVs in the US that helps you get your applications compatible with the latest Microsoft technologies. Front Runner provides you with access to Microsoft experts who can answer your questions and to training courses on developing for Windows 7 and Windows Server 2008 R2. Once you tell us that your application is compatible, you’ll get a range of marketing benefits to help you let your customers know you’re a Front Runner, including customizable marketing and PR campaigns as well as listings in Microsoft directories that are viewed by millions of people.

For ISVs outside the United States, you can participate in ISV App Compat.

Adding Windows 7 Support

Once you have completed getting your application ready for Windows 7, you are ready to add support for Windows 7 features.

In this four-part of this series, we explored the business reasons to support Windows 7 and how you can be sure your application is compatible, three features you should incorporate right away, and how you can lead your marketplace by adopting Windows 7 features.

You can see the series of videos on MSDEV, A Developer's First Look at Windows 7.

 

Bruce D. KyleISV Architect Evangelist | Microsoft Corporation

cid:image010.png@01C9DEED.1FDB2200 cid:image011.png@01C9DEED.1FDB2200 cid:image012.gif@01C9DEED.1FDB2200

Technorati Tags: XP,Windows7,Application
Windows Live Tags: XP,Windows7,Application
WordPress Tags: XP,Windows7,Application