Forum Home
Press F1
 
Thread ID: 23735 2002-08-24 00:51:00 Shortcut to Show/Hide Files Jester (13) Press F1
Post ID Timestamp Content User
73504 2002-08-24 08:12:00 You could have a single Windows script file to detect the current state of the registry key and swap it to the other state.

You could probably also use a plain text InputBox as a password-type protection (except it wouldn't have *****'s).

If someone wants to grab the reg settings, I could probably post the complete code over the next couple of days.
antmannz (28)
73505 2002-08-25 01:42:00 Those inquisitive kids aye :-)

Well if your that desparate then download a program that hides folders. Magic Folders does this and password protects so you cant unhide without password.

www.tucows.com
parry (27)
73506 2002-08-25 02:24:00 Here is an update on the registry locations for the switches that hide/unhide files extensions etc.
In this key below, the same as mentioned above, is just the information for the checked, unchecked and default values, together with the text that appears in the Folder Options boxes:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Curr entversion\explorer\Advanced\Folder
and then there is a sub key Hidden with 3 subkeys, NOHIDDEN, NOHIDORSYS, SHOWALL. The default value for all these 3 is (0), and the checked values are (2), (0), (1) respectively.

The next subkey of Folder is HideFileExt, and the checked, unchecked, and default values are (1), (0), (1) respectively.

These values tell you what to change in this key:

HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntversion\Explorer\Advanced\
In the right hand pane are listed the features such as Hidden, and HideFileExt , and the data values that be be switched from 0 to 1 etc.

If you manually change the values, eg HideFileExt, the file extensions change immediately from showing to hidden and vice versa.

One thing I cant see is a separate value for hiding system files.

Without actually doing all the work, the reg file way would be to export this key to a reg file, then make another with the switches changed.

Else antman may be able to write a script file.

This is the exported Advanced key reg file on my set up:
REGEDIT4

[HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Advanced]
"Hidden"=dword:00000001
"ShowCompColor"=dword:00000000
"HideFileExt"=dword:00000000
"DontPrettyPath"=dword:00000000
"ShowInfoTip"=dword:00000001
"HideIcons"=dword:00000000
"ShowAttribCol"=dword:00000001
"MapNetDrvBtn"=dword:00000000
"ClassicViewState"=dword:00000000
"CheckedSCDlg"=dword:00000001

I hope this makes some sense, but I dont feel inclined to go further :)
Terry Porritt (14)
73507 2002-08-25 07:04:00 Thanks for that Terry. :)

Jester, copy and paste the following bold text into Notepad:


pWord = "password"

If InputBox("Please enter your password:","Password") = pWord Then

Set sh = CreateObject("WScript.Shell")
theKey = "HKCU\Software\Microsoft\Windows\CurrentVersion\Exp lorer\Advanced\Hidden"
setHidden = sh.RegRead(theKey)

If setHidden = 1 Then
setHidden = 0
MsgBox "System and hidden files will no longer appear in Explorer.",64,"Hidden File Exchange"
Else
setHidden = 1
MsgBox "System and hidden files will appear in Explorer.",64,"Hidden File Exchange"
End If

sh.RegWrite theKey,setHidden,"REG_DWORD"
Set sh = Nothing

End If


The very first line sets the password. You can change "password" to anything you like, just make sure the speech marks remain.

Save the file to your desktop (or somewhere). You can call it anything you like as long as it has a .vbs extension on the end of it. It's icon should be a page with a blue scroll on it.

Double-click this icon to swap between hidden or not. You will need to enter the correct password for the swap to work.
antmannz (28)
73508 2002-08-25 07:11:00 Oops, forgot to say you might want to place the file into your windows folder and put a shortcut to it on the desktop. :) antmannz (28)
1 2