Vista UAC and application names

While working on the UC Metro project, we ran into a really odd situation, and I wanted to blog about it so that hopefully others can avoid the problem.
We created a sample application using WPF. The test machine we were using had UAC turned off because we also had to run some debugging tools that wouldn’t run with UAC. Our sample application worked great, but when we turned on UAC it would require elevation, and then fail. We couldn’t figure out why, so Mike Jensen (one of our super smart programmers) created a new project with the same name and started subtracting files, one by one. Same problem.
Then Mike decided to try changing the project name, which had previously been “WpfDispatchBaseApplication”. Voila! It worked perfectly with UAC on. It turns out that there are some magic words that will trigger a UAC elevation prompt if Vista sees them in the application name. See here for an example: “update” is one of the magic terms. This is by design, and you can fix it in two ways: include an application manifest, or don’t use any magic words. We decided that “Litware Service Call Manager” better reflected what the sample app was actually doing, so we stuck with it, but from now on we’ll use manifests… even for our samples.

Advertisements

Comments Off on Vista UAC and application names

Filed under General Tech Stuff

Comments are closed.