Don’t call your Windows app UpdateAnything

I wrote a little Windows utility that updates a file. It’s safe and harmless; it just modifies a file which is in my user documents folder. I called the utility UpdateMSI. Under Vista with UAC enabled, running this app throws up a dialog:

An unidentified program wants access to your computer

But why? Simple: Vista inspects the name of the executable, notes that it includes the word “update”, and concludes that it needs local administrator rights.

On the face of it, this is silly. First of all, Vista is wrong: my app does not need admin rights. Second, it is infuriating that I am not given any choice in the matter. The UAC dialog says “Cancel” or “Allow”. It does not include the option to run with my normal user rights.

Microsoft did this in an effort to detect setup applications; the word “setup” has the same effect. It will trigger if the word is anywhere in the executable name. I tried it with WorldCupDatePicker.exe – same result.

Surely it would not have been too hard to give the user a say in this? Just a checkbox that says “Let me run this how I want on my computer”? You can disable UAC of course; but I’m not going to do that; overall it’s a good feature.

If you wrote the app, there is a fix. You have to embed a UAC manifest in your application. There are simple instructions here, though note that these explain how to force the UAC prompt, not how to suppress it. If you don’t want to run as admin, modify the line:

<requestedExecutionLevel level=”requireAdministrator”/> 

to read instead:

<requestedExecutionLevel level=”asInvoker”/>

Bottom line: always include a manifest.

Technorati tags: , ,

A common-sense introduction to software factories

If you’ve been intrigued by Microsoft’s idea of integrating software factories into Visual Studio, you might want to read this mini-series by Edward Bakker and Jezz Santos:

The motivation behind this effort has been that we’ve recognised that there is little practical information helping ordinary professional developers on getting started with building and understanding software factories. We have had quite a head start on this and wanted to share our knowledge and experiences with you and the community to promote the uptake of building factories, which in turn should promote the adoption of software factories and the industrialisation of software in general. This series was created in a format that asks a logical sequence of questions that you might have when trying to figure out how to build software factories today.

Pretty good as a guide for the perplexed. A couple of other links. Jeremy Miller explains why he is sceptical:

The big hangup that I have with software factories is that I think some atrociously bad systems are going to be created by blindly following the “guidance” from the software factory.  Also, *who* is building the guidance in these software factory thingies?  Are they really good enough to do that?  Is my system really suitable for a generic set of patterns?

I also liked the comment to his post which asks about:

Microsoft software which uses the product (other than demo, please):

I’m reminded of when I asked Scott Guthrie what modeling tools were used by the ASP.NET team. His answer: a whiteboard.

Finally, RegDeveloper editor David Norfolk has some comments on UML and MDA arising from the article.

 

Technorati tags: ,