Migrating to Vista is a two stage process for programmers - there is the tool setup, and then there is the gradual porting off all the various utilities and applications that have been built under the old version of Windows. It is straightforward in a sense - Microsoft have built in excellent compatibility measures - but there are some things to be wary of.
The first few caveats came to light whilst using BBC BASIC for Windows. They relate to the way in which Microsoft has chosen to plug some security holes in XP. Namely:
In fact, the majority of holes relating to the file system exist in circumstances where the local user has administrative privileges - the default situation, it seems. In Vista, no programs ever run with these privileges, the opposite of XP's behavior.
There are three issues to address - access to one's own Program Files folder, sharing data with other programs in the same suite, and access to the registry. We shall look at the file system specifics in this article.
Firstly, kudos to Microsoft for fixing the security holes in Vista, and leaving compatibility with XP. In fact, Vista will look at an application, determine if it is 'Vista-enabled' and then run a virtual file system for it, based on the old XP behavior.
This sounds like good news, until one realizes that the file system in question can only ever be used by the program itself. Therefore it may be transient (data may not be there the next time the application starts up), and it will not be available to other applications in the same suite.
Granted, these are quite specific problems, and are easily circumvented, but it is worth checking to make sure when a program is ported from XP (and pre-XP) to Vista, that it behaves in a way that will avoid creating problems with the user. That being the first priority, there are a couple of things to avoid.
There are really only two thing to avoid in a port to Vista (as regards this particular issue):
If both of these are 'corrected' for Vista, then the issues will clear themselves up. For all those wanting to use .ini files - just make sure that they are not in a folder under Program Files. If necessary set up a shared data area, then one can share data between applications also.
One side-note : this also applies to programs that cerate content (such as HTML, XML, or XHTML) and then ask a third party tool (browser, in this case) to open it. If the file is stored under C:\Program Files\App\Data\Temp, as so can easily happen, then the chances are the third party tool will not find it.
This brings us neatly to ways of setting up tools - compilers, linkers, editors, etc. - under Vista. They tend to make temporary, in-between, files. Some of the tools (Borland C++ for example) do so in their own folder.
The issue is that these tools work by calling different applications in a tool-chain. Borland C++ will call a resource compiler, for example, to build resources to add to a Windows application. These files risk to become unavailable if the tool has been installed under the Program Files folder.
Follow the same approach for any custom-built tools that you might have, and there should be no problems. It is just a case of working with the security model, rather than ignoring, or trying to circumvent it.
If there are any specific questions that the reader might have regarding Microsoft Vista and the programming path towards it, please feel free to email the author : ComputerProgramming@Suite101.com, or post it in the discussion below.