Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

Tuesday, March 23, 2010

What happened to File Assossiaction under Vista, Seven?

Back to my help-you-do-it articles...

One thing bothered me for a while: our dear Microsoft removed the file associations item that was under the Tools Menu.What the hell? I never quite understood why MS does that sometimes. Information Architecture is very important, and regrouping items might make things better for the user. However, those grouping and organizations should reflect what the user (us!) believes to be the right way to sort the information.

I mean, when asked the question, "where is the right place to put <something>?", the answer is usually "where most users think it will be!". So Microsoft, where do *you* think your users look for file associations? Where it has been for more than a decade, under the Tools menu!

When I was looking for it, to fix an association that another badly planned application decided to break, I immediately went to the Folder Options, under the Tools Menu and looked for the association, which was no longer there.

Before I panicked I decided to Google it, and found out that the associations are now under a specific application called Default Programs, under the Control Panel.

The Default Programs application is a more user-friendly version of the old File Associations tab. It lets the user change the default program that will open an file (based on the extension, as it's the custom in Windows), change the association between file extensions and programs, set the autoplay defaults, and even use a profile-like thing to rapid switch configurations for associations (which is done in order to enable the user to quick return to a Microsoft setting, of course).


So far, so good. If you need to reconfigure your file associations, you should look at this wizard.

HOWEVER, where is the "advanced" button? None. Microsoft thinks all of us, users (even those with a Enterprise Version of Windows Vista) are dumb. So there's no way to change how the application is executed, like, for example, which parameters would be provided when calling a program to open a certain file. in my case, I was simply trying to tell windows that Java jar files are opened by calling java -jar JARFILE.

Well, enough complaining. How do we do it? There are two shell utilities, ASSOC and FTYPE, that enables us to do it. If changing the place of the interfaces was a bit unfortunate, I must say that the new solution is way better. ASSOC and FTYPE lets us create a N to N association between file types and extensions, and it's much more clean than the way it worked with the old interface.

You must take two steps in any order when defining the associations:

Define the File Type
A file type is a kind of "profile" for your file (I think file class would be an even better name). You name it anything you'd like and informs how it's opened. On my Java JAR example:

FTYPE jarfile="C:\aplic\Java\jre6\bin\javaw.exe" -jar "%1" %*

where %1 is the filename that Windows will gladly pass to your application and %* tells windows to "pass everything else to the program the way you received it". The last one doesn't make much sense in Windows, but the truth is that the shell will also use this list to open files, so if you simply type the filename on the prompt, you end up opening the file.

Create the Association
Now, for the association itself,

ASSOC .jar=jarfile

which is quite intuitive: you tell Windows to threat files with .jar extension as jarfiles.

Saturday, September 6, 2008

Microsoft Always Think We Default To "Stupid"

While I write my next real blog post, a minor rant (and something to remember when you are developing an application):

Microsoft newer products, since the complete widespreading of Internet, which would begin by the end of the last century, are PARANOID. First of all, they assume the user is a complety newbie that will do everything wrong. Secondly, they assume everything outside (and, sometimes, inside) the computer that can be harmful will be. In other words, MS has closed all doors to your computer that they could imagine, so that no hacker could exploit them. 

Of course, all this paranoia accomplished nothing. MS browsers, OSes and Applications are still vunerable to exploits. But it also made the life of the user (us!) much more difficult -- we have to click a lot of pop-ups to let our applications make anything deemed harmful, like downloading a file from the internet or modifying the system register. But today, I've come to the best example of how this untrusting paranoia can be paradoxal:

I use MS Project server on my projects and today I decided to try to integrate it with my Outlook 2007. So I navigate to the Project portal and browse to the web page where I can download the plugin. Naturally, this is a ActiveX plugin that is unsafe accordingly to Microsoft, so when I click the button, I get this message box:

Now, MS asks me to disable all that security paranoia, and just be careful. See the deadlock they've created?