| | |
how to programatically "hide/show extensions for known file types"?
![]() |
Hi,
This seems like a really simple question.
Most of the time I choose to show extensions for known file types, but sometimes (most notably when renaming files by hand) it is convenient to hide them.
This is achived by checking the checkbox at:
Tools -> Folder Options -> View -> Hide extensions for know file types.
Now what I would like to do is write a really simple app which will change this for me instantly.
So maybe when I run the app once it enables the setting and when I run it again it disables the setting. Really simple.
I'm guessing there is a DWORD somewhere in the registry or something to that effect. How would I got about doing this programmatically?
PS. I would prefer to do this in C# if possible.
Thanks in advance,
This seems like a really simple question.
Most of the time I choose to show extensions for known file types, but sometimes (most notably when renaming files by hand) it is convenient to hide them.
This is achived by checking the checkbox at:
Tools -> Folder Options -> View -> Hide extensions for know file types.
Now what I would like to do is write a really simple app which will change this for me instantly.
So maybe when I run the app once it enables the setting and when I run it again it disables the setting. Really simple.
I'm guessing there is a DWORD somewhere in the registry or something to that effect. How would I got about doing this programmatically?
PS. I would prefer to do this in C# if possible.
Thanks in advance,
.iMMersE your soUL in LOVE.
•
•
Join Date: Jul 2009
Posts: 19
Reputation:
Solved Threads: 1
its not easy enough to just do it manually?
if i was making an application to do this i would use autohotkey or autoit to just basically do a macro...
if i was making an application to do this i would use autohotkey or autoit to just basically do a macro...
Thanks for fast reply!
Yes, but it is is even easier to have a once click app in my taskbar.
Also, for files on the desktop, folder options are not immediately accessible.
Also, I like learning new things, and lastly, I have OCD.
I would rather not use a third party app for such a simple task. I'm sure in the end it just comes down to changing a single value somewhere in the registry...
Yes, but it is is even easier to have a once click app in my taskbar.

Also, for files on the desktop, folder options are not immediately accessible.
Also, I like learning new things, and lastly, I have OCD.
I would rather not use a third party app for such a simple task. I'm sure in the end it just comes down to changing a single value somewhere in the registry...
.iMMersE your soUL in LOVE.
Woo, I figured it out. 
Works perfectly (in XP anyway).
It really is this simple:
Problem is that it doesn't update instantly... you have to hit refresh (or close windows explorer and open it again).
I wonder if there's a way to force the OS to invalidate or something...

Works perfectly (in XP anyway).
It really is this simple:
using Microsoft.Win32;
namespace ShowHideExtensions
{
class Program
{
static void Main()
{
RegistryKey key =
Registry.CurrentUser.CreateSubKey(
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced");
if ((int)key.GetValue("HideFileExt") == 0)
{
key.SetValue("HideFileExt", 1);
}
else
{
key.SetValue("HideFileExt", 0);
}
}
}
}Problem is that it doesn't update instantly... you have to hit refresh (or close windows explorer and open it again).
I wonder if there's a way to force the OS to invalidate or something...
.iMMersE your soUL in LOVE.
•
•
•
•
I wonder if there's a way to force the OS to invalidate or something...
Refreshing explorer:
http://social.msdn.microsoft.com/For...b-4580be9b344f
![]() |
Similar Threads
- where is "file types"? (Windows Vista and Windows 7)
- Hi all i'm new to the fourm and need someone to decipher a hijackthis log file PLZ!! (Viruses, Spyware and other Nasties)
- "Cannot find server or DNS Error" and Trojan Virus (Viruses, Spyware and other Nasties)
- oinadserver and "server busy" -- need help (Viruses, Spyware and other Nasties)
- "Dead" icon in taskbar (Viruses, Spyware and other Nasties)
- I get a "virus Alert" in toolbox (Viruses, Spyware and other Nasties)
- For Darkwarrior088: i can't get rid of this "server busy" virus... (Viruses, Spyware and other Nasties)
- windows explorer not opening (Web Browsers)
Other Threads in the Windows NT / 2000 / XP Forum
- Previous Thread: Invalid and disappearing boot.ini - Ask Toolbar:UNBELIEVABLE!!
- Next Thread: windows server 2008
| Thread Tools | Search this Thread |
.net 2007 2010 a.exe alaris apache appstore arm auto automatically black blue book boot cellphones collaboration computer computerfreezes crash cursor deployment desktop desktops dns dotnetnuke downloads drive eartlink error errors explorer features firefox folder fontmanagers format framework gadgets install intel internet interoperability killprocess laptop linux load login mac microsoft mobile monitor motionle1600 netbooks novell nvidia open operatingsystems osx palm partition patch port printer product proxy rds remotedesktop remotedesktopconnection repair replacingraiddrive retrieve screen simplifiedchinese sp1 ubuntu unreadable update usb verizon videodrivers videogames virtual virus vista visual volume vulnerability wab webos weecam win win32/heur window windows windows7 windowsxp windowsxpnotstartingup. worm xp xpde






