« Clearing a cached query in ColdFusion | Firefox "Software Update Failed" problem: solved! »

May 4, 2006

Automatically hide file extensions in Windows

In Windows there is a setting to specify whether or not to show the extensions of recognized file types. By default, it's set to hide known extensions. Most computer geeks like to change this setting to always show the extensions…

But not me. I'm weird like that. (I attribute it to my interest in design—I prefer "clean" looking things and I don't need to have the extensions cluttering up my list of files. After all, I can determine the file type by its icon.)

Well for some reason, Windows hates me because after every reboot, I find that it's changed this setting to show all the extensions. After logging into my computer I have to re-adjust the setting. I'm good then until my next reboot, at which point all of the extensions will magically be showing again. (Who knows, maybe it's some other program or utility that I have installed on my machine that's doing this. All I know is that I've had this annoying problem on more than one computer.)

I've Googled in vain several times trying to find a cause for this erratic behavior hoping to find some miraculous cure. But no such luck. Seems there are plenty of pages describing how to change the setting to always show extensions, but what if you want to always hide extensions, despite Windows' own intentions?

Well, I finally decided to take matters into my own hands… I've written a small Windows Scripting Host script that will manually change the registry setting to either show or hide the extensions. By setting up a scheduled task that runs this script every time I log in, my computer now correctly "remembers" that I'd rather not see those file extensions. I'd be curious to see if anyone else has had this same problem. Let me know if this script helps anyone.

Posted at 3:20 PM in Computers

Comments

1. Ken says:

I just recently got this problem after I use XP SP3. However, I found out that this situation also occurs in Vista SP1 as well. So I cannot find anything wrong with my installed programs at all (I check it out one-by-one with my own eyes extremely carefully).

It seems like you found this problem a lot ealier than me.Good luck that I got your script to work on my computer. Thank you so very much.

Posted on July 30, 2008 at 12:50 PM

2. Richard Davies says:

Ken, I'm glad I was able to help you out. I was beginning to think that I was the only person in the world with this problem...

Posted on July 30, 2008 at 1:26 PM

3. Rahmat says:

Well I have got the same problem for the past one month. I don't know how i got into this problem. I have heard from some people arround me that my computer has been infected with virus but i don't think that they are true.
My case is a bit different because my file extension keep showing even without a system restart. It shows up after a few hours. I don't really have the idea..... how it happens.
I have downloaded the script that is mensioned above but I really don't have the idea of how to use it. Please help me in this regard.
Thanks

Posted on October 8, 2008 at 4:30 AM

4. Richard Davies says:

@Rahmat

Once you've downloaded the script, you should just be able to double click on it to run it and it should hide the file extensions. If you have associated another program with .js files (instead of the Windows Script Host), you'll have to make Windows Script Host the default program for .js files.

P.S. I've noticed that it usually takes Windows a minute or two after executing the script to notice the change and apply it.

Posted on October 8, 2008 at 8:32 AM

5. Ben says:

Wonderful, this helps me out greatly!
Thanks a ton!!

Posted on February 11, 2009 at 9:38 AM

6. Mike says:

It's a relief to see others have this same problem - I was thinking that I was the only one too!!! :) Just by chance, do any (or all) of you have Norton Antivirus installed? I noticed that I began to have this problem after some huge update by Norton. It really is annoying! I'll try your script and see how it works! Thanks a bunch!

Posted on May 18, 2009 at 5:35 PM