ILoggable

A place to keep my thoughts on programming

February 20, 2010 rant , , ,

You’re an administrator, not THE Administrator

I set up a new dev machine last week and decided to give win7 a try. Most recent dev setup was using win2k8 server and it’s still my favorite dev environment. Fast, unobtrusive, things just worked.

Win7 appeared to be a different story, reminding me of the evil days of Vista. I had expected it to be more like Win2k8 server, but it just wasn’t. I was trying to be zen about the constant UAC nagging and just get used to the way it wanted me to work. But two days in, it just came to a head and after wasting countless hours trying to work within the security circus it set up, i was ready to pave the machine.

Here’s just a couple of things that were killing me:

Can’t save into Program Files from the web
Had to save into my documents then move it there. Worse, it told me i had to talk to an administrator about that. I am an administrator!
Can’t unzip into Program Files
Same story as above.
Have to whitelist reserve Uri’s for HttpListeners and you can’t wildcard ports.
This was the final straw, since my unit tests create random port listeners so that the shutdown failures of a previous test doesn’t hose the registration of the next.

All these things need administrator privileges. But wait, I am an administrator, so what’s going on? It appears that being an administrator is more like being in the sudoers file on unix. I have the right to invoke commands in the context of an administrator, but my normal actions aren’t. I tried to work around this with registry hacks, shortcuts set to run as administrator and so on, to try to get things to start-up with administrator privs by default, but Visual Studio 2k8 just refused to play along. You cannot set it up so that you can double-click on a solution and it launch the solution as administrator in Win7. And even if you start VS as administrator, you cannot drag&drop files to it since it’s now running in a different context as Explorer.

And if you ask MS Connnect about this you’ll find that like anything of value the issue has been closed as “By Design.”. Ok, look buddy, just because you designed a horrible user experience doesn’t mean the problem can just be dismissed.

But why was win2k8 so much better an experience, a nagging voice kept asking. Turns out that on win2k8, i just run as Administrator. Win7 never gave that option (and you have to do some cmdline foo to enable the account.) Being a unix guy as well, running dev in what is root, just felt distasteful. But distaste or not, it’s the key for actually being able to do productive development work in windows. As soon as I became THE Administrator, instead of an administrator, all was smooth again.

Stupid lesson learned.

Leave a comment