I'm working with some legacy applications (10-15 years old), and am trying to find guidance on the "right" way to install and run them (and any user application) on Windows 7 without requiring full Admin privileges.
In other words, where executable/read-only should files go, where user-data/read-write should files go, where registry entries should go, to avoid issues with the UAC and Windows 7 file/registry virtualization during both installation and at run-time.
I seem to remember, years ago, a Microsoft white paper on this subject, but am unable to find any relevent information now. I have found information on the user side (how to get legacy applications to run on Windows 7 via compatibility tweaks), but none on the developer side (how to create/install applications to play nicely on Windows 7 natively).
Any pointers to such information would be most appreciated. Thanks.
Marc
The Windows 7 Training Kit has a big section on application compatibility, including playing nicely with UAC, installing to the proper folders, etc.
http://www.microsoft.com/downloads/en/details.aspx?familyid=1C333F06-FADB-4D93-9C80-402621C600E7&displaylang=en
If you are also looking to use the new features of Windows 7 and not just get your app compatible, there's a lot in the kit that can help.
You're thinking of the Windows Logo Requirements.
Next is that fact that you should not be writing to any location that requires administrative permissions.
Since most applications ignored the logo requirements, and would fail when run with standard user privileges, Windows Vista included the ability to keep these buggy applications limping along by virtualizing writes to protected locations - rather than having them fail.
You can opt out of this compatibly hack by manifesting your application to RunAs Invoker:
The logo guidelines talk about UAC and virtualization of writes to certain locations:
Then there was high-dpi. The Windows Logo requirements for a decade has required applications to respond appropriately to high (i.e. non-96dpi) displays. Since most applications break horribly if the user does use "Large Fonts", Microsoft gave up and, like virtualization of the file system, they also virtualize the dpi setting. Unless an application opts out of the compatibility hack: Windows will lie to you and tell you that you are 96dpi.
Only once you've written your app properly should you add an entry to your application's manifest to disable high-dpi scaling:
Anyway, it's all there, the Windows 7 Client Software Logo Program.
Note: If you were writing a Windows application 15 years ago (1995) i assume you were writing for:
rather than:
It's important to note that Windows NT was designed as a secure operating system. You are not allowed to arbitrarily do anything you want. This is a fundamental difference from:
which had no security.
Writes to the Windows and Program Files folder requires administrator permission. This is because normally only administrators should install applications. But it regular users cannot modify, or damage, installed programs - or the installation of Windows itself, e.g.: