News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Showing so-called super hidden files

Started by sinsi, January 23, 2012, 10:28:08 AM

Previous topic - Next topic

sinsi

I get a bit sick of the amount of clicks needed to uncheck "Hide protected files", and was looking how to automate it (toggle).
There is a registry value ShowSuperHidden that seems to control it but it shows up a few times in the registry, even as a key.
Anybody know of a way to change it? If I change the value then refresh whatever I am viewing it's good but was wondering about an official way.
Light travels faster than sound, that's why some people seem bright until you hear them.

jj2007

Programmatically it's not that difficult, but Explorer shows an odd behaviour: If you set the registry key and press F5, it does not change the display. If, however, you perform some file operation, such as renaming C:\mydummy.dat to C:\mydummy.txt, then press F5 again, then you can see/not see the *.sys files as in the example below.

include \masm32\MasmBasic\MasmBasic.inc   ; download
GfNoRecurse=1   ; GetFiles looks only at the root

.code
ShowSysFiles proc mode
   SetRegVal "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden", mode
   Let esi=Str$("ShowSuperHidden=%i:", GetRegVal("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden", 123))
   GetFiles C:\*.sys   ; pagefile.sys etc
   For_ n=0 To eax-1
      Let esi=esi+CrLf$+Files$(n)
   Next

   ret
ShowSysFiles endp

   Init

   push GetRegVal("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden")
   invoke ShowSysFiles, 0
   MsgBox 0, esi, "Sys files hidden - now launch Explorer and look at C:\", MB_OK

   invoke ShowSysFiles, 1
   MsgBox 0, esi, "Show sys files: Refresh Explorer", MB_OK

   invoke ShowSysFiles, 0
   MsgBox 0, esi, "Hidden again: Refresh Explorer", MB_OK
   pop eax

   SetRegVal "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden", eax

   Exit
end start

dedndave

there are a few different ones
if you remember, when the os is freshly built, there are a couple places that you have to check off
ones that i can recall are the C:\ root and C:\Windows folders
when you first try to access these folders in explorer, the right-hand pane is blue and has a warning

but, the main ones that you are probably interested in:

1) show hidden files and folders
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:0000001


2) show protected system files and folders (SuperHidden)
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"ShowSuperHidden"=dword:0000001


Show.reg file:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced]
"Hidden"=dword:0000001
"ShowSuperHidden"=dword:0000001


Magnum

Are you afraid of accidentally deleting one if you leave it set to show all files?

Have a great day,
                         Andy

dedndave

 :bg

he works on other peoples machines all the time   :P

Magnum

Have a great day,
                         Andy

sinsi

Yep, need to change hidden and superhidden for all to show. Thanks dave, forgot hidden  :red
When it's changed via the options dialog, when you hit apply it happens straight away. Might try to trace what happens.

Quote from: Magnum on January 23, 2012, 09:41:10 PM
Ahhh so.

My condolences.
At the moment, condolences are appreciated (a few stupid fckn customers in the last fortnight).
Light travels faster than sound, that's why some people seem bright until you hear them.

dedndave

i am doing a little work on one of my mom's computers, at the moment
it is a Dell Dimension 2400, ~5 years old

it boots, runs ok - for about 5 to 30 minutes - lol
at some (spurious, seemingly random) time, the screen goes black
there is a cowl or hood that goes over the CPU heat sink to the chassis fan
underneath that cowl is a row of about 6 electrolytic capacitors
all but one have the top pushing out   :P
2 of them are just starting to spew out what i like to call "puke" - it's the electrolyte, of course (which, by the way, is very caustic)
at first thought, i was just going to replace the caps and call it good
but, i think i'll replace the power supply, as well
it is likely that these caps are seeing too much ripple current (slight overvoltage can cause the same symptom)
it must be that the p/s is noisy

MichaelW

Dave,

My immediate impression was that the system is too recent to have capacitors with the counterfeit electrolyte problem, but perhaps not:

http://en.wikipedia.org/wiki/Capacitor_plague

The only Dell system failure that I have encountered was because the fan that feeds the hood was stuck at a speed that was too slow to keep the CPU cool. The early P4 (Willamette) processor eventually died, so I replaced it and the fan, and the system is still running today, some 5 years later. Perhaps your mom's system also has a problem with the fan, so everything under the hood is hotter than it should be.

I was recently given a Dell Dimension 4600 built in December 2003, that I originally ordered and set up. AFAIK it has never had any problems, but it was used only occasionally. Now that I'm alerted to a potential problem I'm going to try stressing it with Quake II timedemo and see what happens.

eschew obfuscation

dedndave

thanks for the info, Michael
i took a look at the wiki page
i dunno where that guy is coming from, but capacitors have been doing that since they started making electrolytic caps   :P

the problem is - it is difficult to find a rating on older nipon caps for ripple current
that, and the fact that ripple current from switching power suppllies can be hard to measure or calculate
the transitions are quite fast, and the spikes are very narrow - difficult to see, even on a good scope

on the bright side, manufacturing techniques are continually improving
that means better caps, for the same footprint (size/shape)
also - better switching power supplies, as time goes on

i did not see any problem with the fan on this particular machine
but i will have a closer look at it, now that you brought it up   :U

dedndave

little follow-up
it appears that those caps are on the output of the 3.x volt regulator
why they decided to use a switching regulator instead of a linear one at that spot, i don't know
anyways - the p/s is no longer a suspect   :P

the fan seems to be running normally

i managed to find some 10v high-temp parts that will fit in there, instead of the 6.3v
we'll see how it goes

sinsi

Well the on/off bit is OK, I just save the current settings to a file then hit 'on' or 'off' (or 'restore' when I'm finished) but the refresh thing is beyond me.
All sorts of advice via google but not one works. A few looked like they might, maybe it's this new desktop isolation thing, maybe it's 32v64 bit.
It doesn't really matter though, pressing F5 is easy, but it would have been nice to know how explorer does it - using procmon it seems to rebuild the icon caches among other things, too much work.
Thanks fellas.
Light travels faster than sound, that's why some people seem bright until you hear them.