win7系统右键菜单添加显示和隐藏文件的方法

相信大家都知道win732位旗舰版中可以设置隐藏文件,给文件设置隐藏属性后,然后在文件夹选项中设置不显示隐藏文件,就可以防止别人查看隐藏的文件。可有的win用户觉得设置非常麻烦,想在右键菜单中添加显示及隐藏文件的选项,不知道如何设置,所以接下来请大家跟小编一起学习win7系统右键菜单添加显示和隐藏文件的方法。

设置方法:

1、首先在空白处右键打开菜单,选择“新建--文本文档”;

2、打开新建的txt文件,把下方代码复制进去;

@echooff

modeconcols=100lines=10

title右键隐藏文件+扩展名

color0b

ifnotexist%windir%\SuperHidden.vbsgotosetup

regdeleteHKCR\CLSID\{00000000-0000-0000-0000-000000000012}/fnul2nul

del/f/q%windir%\SuperHidden.vbsnul2nul

echo.echo卸除完毕。要重新安装请再执行一遍本bat

pausenul

exit

:setup

color0a

%windir%\SuperHidden.vbsechoDimWSHShell

%windir%\SuperHidden.vbsechoSetWSHShell=WScript.CreateObject(WScript.Shell)

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\CLSID,{13709620-C279-11CE-A49E-444553540000},REG_SZ

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\method,ShellExecute,REG_SZ

%windir%\SuperHidden.vbsechoifWSHShell.RegRead(HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden)=1then

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden,0,REG_DWORD

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden,2,REG_DWORD

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt,0,REG_DWORD

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command,显示隐藏的文件和文件夹,REG_SZ

%windir%\SuperHidden.vbsechoWSHShell.SendKeys{F5}+{F10}e

%windir%\SuperHidden.vbsechoelse

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ShowSuperHidden,1,REG_DWORD

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Hidden,1,REG_DWORD

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt,0,REG_DWORD

%windir%\SuperHidden.vbsechoWSHShell.RegWriteHKCR\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag\command,不显示隐藏的文件和文件夹,REG_SZ

%windir%\SuperHidden.vbsechoWSHShell.SendKeys{F5}+{F10}e

%windir%\SuperHidden.vbsechoendif

%windir%\SuperHidden.vbsechoSetWSHShell=Nothing

%windir%\SuperHidden.vbsechoWScript.Quit(0)

regexportHKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced%temp%\__.regnul

for/ftokens=2delims==%%.in(find/iHideFileExt%temp%\__.reg)dosetv=%%~.

del%temp%\__.reg

setv=%v:~-1%

if%v%equ0setvv=不显示隐藏的文件和文件夹

if%v%equ1setvv=显示隐藏的文件和文件夹

%temp%\_.regechoREGEDIT4

%temp%\_.regecho[HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\SuperHidden]

%temp%\_.regecho@={00000000-0000-0000-0000-000000000012}

%temp%\_.regecho[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\InProcServer32]

%temp%\_.regecho@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,73,79,73,74,65,6d,33,32,5c,73,\

%temp%\_.regecho68,64,6f,63,76,77,2e,64,6c,6c,00

%temp%\_.regechoThreadingModel=Apartment

%temp%\_.regecho[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance]

%temp%\_.regechoCLSID={3f454f0e-42ae-4d7c-8ea3-328250d6e272}

%temp%\_.regecho[HKEY_CLASSES_ROOT\CLSID\{00000000-0000-0000-0000-000000000012}\Instance\InitPropertyBag]

%temp%\_.regechomethod=ShellExecute

%temp%\_.regechoParam1=SuperHidden.vbs

%temp%\_.regechoCLSID={13709620-C279-11CE-A49E-444553540000}

%temp%\_.regechocommand=%vv%

regedit/s%temp%\_.reg

del/f/q%temp%\_.reg

echo.echo已在右键中添加显示隐藏文件和文件夹再次执行本bat即可卸载

pausenul

exit

3、然后点击左上角的文件打开菜单,选择“另存为”,之后把文件名改为“文件名.bat”,将文件类型修改为所有文件,然后点击保存;

4、双击运行刚才保存的bat文件即可添加,如果想取消只需再执行一次bat文件即可。

点击执行之后,我们就可以在右键菜单中看到“显示隐藏的文件和文件夹”选项了。好了,关于win7系统右键菜单添加显示和隐藏文件的方法小编就跟大家介绍到这里了。