October 2nd, 2007

Don't assume the first person to run your program is an administrator

One “optimization” I’ve seen from some programs is to defer a bunch of system configuration work to the first time the program is run or the first time a feature is requested instead of doing it at install time. The problem with this is that the first person to run your program is not guaranteed to be an administrator. For example, there is one popular media program that doesn’t install its CD AutoPlay handler until you run it for the first time. If the first person to run the program is not an administrator, then their AutoPlay handler doesn’t get installed and consequently never works. This problem became more acute in Windows Vista, where users do not flex their administrative rights by default, even if they are administrators. Consequently, when run on Windows Vista, this program never installs its AutoPlay handler.

It fell to the application compatibility folks to see what they could do to rescue this program from the “not compatible with Windows Vista” pile. It’s frustrating having to “fix” something that was broken when you got there.

Topics
Code

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.

Feedback