For reasons nobody quite understands, Microsoft changed a lot of settings in Vista. Any programmer whose application hard-coded directory settings will soon discover that the application will fail to run well. This article summarizes the changes and how to code around the problem in a version-neutral way.
This is great. So many apps on Windows use hardcoded paths where an API or environment variable should be used. Many also store the wrong data in the given directories, or even worse, store their user data in the program files directory.
This, along with LUA, will force app developers to rethink how they are managing their application’s data, and will probably result in better applications in the end.
As for the reasoning behind the change, I’d imagine the removal of spaces is just to make shell scripting a little easier, rather than having to escape many spaces or quote the entire path. The new layout is far more logical and structured, and seems more networkable than the current system. Just by the directory names I could figure out what I’m supposed to store where… the current system is a mess.
It’s rare I applaud anything by Microsoft, but it’s nice to see them changing things when they need changed, rather than just maintaining backwards compatibility. Applications coded to use environment variables and API data should probably still work… applications which use hardcoded paths should be considered buggy anyway unless it was absolutely required.
Edited 2006-08-07 17:42
I am a Window’s developer. I learned long ago to never use hard-coded paths. In fact, don’t assume the user can write to the application’s directory (e.g., app.path in VB6). You should always use API calls to find the user’s profile directory, just like $home in the unix world.
One of the other good things that has happened is for more applications to be run over Terminal Services. That really enforces more correct enviroment variable / API usage. I know bozo developers who hardcode the temporary filename c: empsomething.tmp, even when there’s no temp directory, or even when there’s no c: drive at all, as is common in Terminal Services / Citrix / ProPalms remapped server environments.
one day soon, it will be the same
“Vista now lets you use an entirely new kind of link called the symbolic link.”
Wow, what incredible technology, it’s hard to believe they could come up with this stuff on their own!
Of course, when one digs a bit deeper, “By default only administrators can create symbolic link.”
Why? A symlink should give you no extra privileges on the object being linked to, so why prevent people from using them?
Still, I suppose it’s a good thing, especially if it prevents more brain damages like two copies of Notepad.
Incidentally, haven’t you been able to use %WINDIR% or things to that effect to locate special directories? We know everyone *should* have been using them, but many weren’t – how are the new methods going to make any difference?
Edited 2006-08-07 21:10
The title could perhaps be more appropiate:”Finding the features in Vista”.