Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Hide files and Hide File Ext reg keys

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
Brando569

Brando569

    Advanced Member

  • Member
  • PipPipPip
  • 412 posts
  • Joined 28-April 04
hey im trying to use reg keys via slickrun (a "floating" run box) to turn on and off hidden files and file extensions. i hate going through the old way, so i decided to do this. the problems that i have are with the hidden files i have to close the explorer window that im using and then reopen it again for it to work. the other problem i have is that the hide file ext's dont work at all... :( how can i get it to work as it does when u select the bullitt in folder options and hit apply? these are the keys im using:

Hidden Files On:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:00000002

Hidden Files Off:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:00000001

Hide Exts:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"HideFileExt"=dword:00000002

Show Exts:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"HideFileExt"=dword:00000000

is there something im missing?


How to remove advertisement from MSFN

#2
spiritpyre

spiritpyre

    Grand Poobah

  • Member
  • PipPip
  • 191 posts
  • Joined 28-April 05
I think I have a rough idea of what's going on. I wasn't able to get either of these to work just by entering the values into the registry (regardless of whether or not I closed the current explorer window I had open). I did notice that if you applied the tweak then closed the process "explorer.exe" and then restarted this process (aka "%windir%\explorer.exe") then you could open Windows Explorer and the tweak was applied. So here's what I think is happening:

The registry entries only serve as flag variables so explorer can "remember" what its settings were when its being reloaded (such as after a reboot or being closed) because anything it had in RAM would be gone. So when you change these flag variables it doesn't take effect until explorer is reloaded. On the other hand, the shell must have a function ffor dynamically changing the UI (because it can update itself instantly when you change things from its dialogs) and it normally justs saves the current status of its UI settings in the registry before it closes.

Bottom line? I think to accomplish an immediate UI change some programming is going to be needed, at least enough to give the shell an argument to toggle whatever feature you want it to change. Bad news? Few people will have the time/knowledge to pull this off (myself included). On the other hand, maybe if someone wrote the guys @ msdn an email they might point you in the right direction (of course they might just as likely "lose" your email but who knows) :}

Edited by spiritpyre, 18 June 2005 - 11:22 AM.


#3
matthewk

matthewk

    Member

  • Member
  • PipPip
  • 297 posts
  • Joined 07-June 05
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
;Show file extensions
"HideFileExt"=dword:00000001
;Show hidden files/objects
"Hidden"=dword:00000001
;Show protected OS files
"ShowSuperHidden"=dword:00000001

edit: The only way I can think of for these to be instant changes if they are not already is to end task on explorer.exe and have windows shell reload.

Edited by matthewk, 20 June 2005 - 08:18 PM.


#4
spiritpyre

spiritpyre

    Grand Poobah

  • Member
  • PipPip
  • 191 posts
  • Joined 28-April 05
that would work but ...

if you wanted to enable it via a right-click menu or toggle button, etc. then it would defeat the purpose as one would need to navigate back to that location {in windows explorer} and all in all it would have just been easier to change via the Folder Options Dialog. I'm sure there's a way to do it dynamically (even if I have no clue how) because it does so thru the dialog.

Edited by spiritpyre, 20 June 2005 - 08:52 PM.


#5
spiritpyre

spiritpyre

    Grand Poobah

  • Member
  • PipPip
  • 191 posts
  • Joined 28-April 05
well after thinking about it a little more i think i'mgetting an idea of how it could be done, if a little bit of a roundabout method:

write a program/script that would toggle the value like so:

1- read current registry value
2- possibly use a case statement (or some if's) to determine
and write new value to registry

3- (haven't figure this part out yet but...) copy current directory path from explorer

4- close the "explorer.exe" process

5- restart process

6- launch an explorer window with the path as an argument


i know its cheap as hell but it *should* do the job (provided I get time to write it)

Edited by spiritpyre, 22 June 2005 - 01:25 AM.


#6
kai445

kai445

    Newbie

  • Member
  • 31 posts
  • Joined 14-July 04
Sorry to bump this somewhat old thread, but someone else had the requst that they could toggle on/off their show files and extensions just the same way you did on another forum when I found this thread.

I came up with this crude system using a batch file, 2 reg files, and a dummy text file.

Download this:
http://rapidshare.de...163/HS.rar.html

Extract it to C:\HS so all the files are in c:\HS (example C:\HS\showext.txt)
Then make sure you have your files and extensions currently "shown" prior to use... though I think if you click the cmd a few times without doing that, that it will settle itself and start working as it should. Whatever.

I made a batch file that is silent. It's pretty neat. Just make your shorctcut to the .cmd file. I included an example shortcut with a star icon cause its prettier.

Oh, and you'll need to refresh the folder you are currently browsing to see the changes take effect.

#7
spiritpyre

spiritpyre

    Grand Poobah

  • Member
  • PipPip
  • 191 posts
  • Joined 28-April 05

Sorry to bump this somewhat old thread, but someone else had the requst that they could toggle on/off their show files and extensions just the same way you did on another forum when I found this thread.

...

<{POST_SNAPBACK}>


That wasn't the problem that we were running into. I've been writing a shell extension for this.. the problem (the same one you had) is that we we can't do this (refresh):

Oh, and you'll need to refresh the folder you are currently browsing to see the changes take effect.

<{POST_SNAPBACK}>



#8
spiritpyre

spiritpyre

    Grand Poobah

  • Member
  • PipPip
  • 191 posts
  • Joined 28-April 05
in fact i had already re-thought my above post about killing explorer and realized early on that this was definately NOT the wa to go.

I've been testing almost completely on Windows XP (home) w/ sp1/sp2 (different PCs) and so far I've come up with this:

Microsoft provides 4 ways of "refreshing" to the user (that I know of). Well, 4 ways other than using the "Folder Options" Dialog. Of those, I've noticed that not all of them work equally well (which more than like means they were coded different by windows developers).
"View | Refresh" Method: As far as I can tell this method does absolutely nothing (at least on my machines)... completely worthless (thanks MS... :angry: )
"F5" method: This is just a hotkey shortcut to the above... so you get the same results (again... thank you MS :angry: )
"Refresh Toolbar Button" Method: Would it surprise you if I mention that this one doesn't work either? (Note this has to be added when you custom you toolbar)
and finally...
"Context Menu | Refresh" Method: you get this when you right-click the background space in a folder (or on the desktop). Guess what?
THIS ONE ACTUALLY WORKS!!!

Other than that you basically don't have any other options. Unless you can program. Then you just have very very few options... google around helplessly... spend days combing the msdn... pray to your favorite shell programmer for help... or worst of all: pay somebody to do it for you :o .

I'm still looking into it and hoping to have a way to programmatically refresh explorer that works (before you post Sendkeys("{F5}") read above...). I'm hoping to find something better than (programming-wise) than using the context-menu and sending 'e' (Refresh)...

Edited by spiritpyre, 29 July 2005 - 02:38 PM.


#9
spiritpyre

spiritpyre

    Grand Poobah

  • Member
  • PipPip
  • 191 posts
  • Joined 28-April 05

hey im trying to use reg keys via slickrun (a "floating" run box) to turn on and off hidden files and file extensions.

<{POST_SNAPBACK}>


I got bored enough that I wrote some shell extensions that will do this... here

the biggest issue they have is that they will only refresh the current window (as opposed to all open explorer windows.) On the other hand, after you use it in one window, you would only have to click on Context Menu | Refresh for it to work in another open window.