Friday, August 3, 2007

Be careful what you name your .exe ...

Windows Vista has some annoying heuristics that look at executables to decide whether they need administrator privileges or not. Unfortunately, these heuristics are fairly brain-damaged.

It seems that putting the word "install" or "update" anywhere in the file name or version properties will trigger the "require administrator elevation" feature in Vista. I had a program that had the word "Updater" in it, which of course frustrated me for a long time as to why Vista wouldn't let me run it as a normal user. I changed "Updater" to "Launcher" and it fixed everything right up.

Oh, and as a side note, don't use the Process class on Windows Vista or Windows Server 2003. Process uses the perf counter to do a lot of its work, which means a normal user can't use it.