前提:

最近在调试一个底层程序,电脑没有对系统进行守护,然后就导致了程序更改了注册表,使得打开所有文件夹均是打开cmd.exe,恐怖~~~~~~~~~~~~~~~~~~~~~~~~~

百度好多方法,都不管用:

最后试用一下解决问题,将下面代码复制到xxx.reg,然后以管理员权限运行:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder]
"ContentViewModeLayoutPatternForBrowse"="delta"
"ContentViewModeForBrowse"="prop:~System.ItemNameDisplay;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;~System.LayoutPattern.PlaceHolder;System.DateModified"
"ContentViewModeLayoutPatternForSearch"="alpha"
"ContentViewModeForSearch"="prop:~System.ItemNameDisplay;System.DateModified;~System.ItemFolderPathDisplay"
@="Folder"
"EditFlags"=hex:d2,03,00,00
"FullDetails"="prop:System.PropGroup.Description;System.ItemNameDisplay;System.ItemTypeText;System.Size"
"NoRecentDocs"=""
"ThumbnailCutoff"=dword:00000000
"TileInfo"="prop:System.Title;System.ItemTypeText"

[HKEY_CLASSES_ROOT\Folder\DefaultIcon]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,00,00

[HKEY_CLASSES_ROOT\Folder\shell]

[HKEY_CLASSES_ROOT\Folder\shell\explore]
"MultiSelectModel"="Document"
"ProgrammaticAccessOnly"=""
"LaunchExplorerFlags"=dword:00000018

[HKEY_CLASSES_ROOT\Folder\shell\explore\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"

[HKEY_CLASSES_ROOT\Folder\shell\open]
"MultiSelectModel"="Document"

[HKEY_CLASSES_ROOT\Folder\shell\open\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,2e,00,65,00,78,00,\
65,00,00,00

[HKEY_CLASSES_ROOT\Folder\shell\opennewprocess]
"MUIVerb"="@shell32.dll,-8518"
"MultiSelectModel"="Document"
"Extended"=""
"LaunchExplorerFlags"=dword:00000003
"ExplorerHost"="{ceff45ee-c862-41de-aee2-a022c81eda92}"

[HKEY_CLASSES_ROOT\Folder\shell\opennewprocess\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"

[HKEY_CLASSES_ROOT\Folder\shell\opennewwindow]
"MUIVerb"="@shell32.dll,-8517"
"MultiSelectModel"="Document"
"OnlyInBrowserWindow"=""
"LaunchExplorerFlags"=dword:00000001

[HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command]
"DelegateExecute"="{11dbb47c-a525-400b-9e80-a54615a090c0}"

[HKEY_CLASSES_ROOT\Folder\ShellEx]

[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers]

[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\BriefcaseMenu]
@="{85BBD920-42A0-1069-A2E4-08002B30309D}"

[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Library Location]
@="{3dad6c5d-2167-4cae-9914-f99e41c12cfa}"

[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\Offline Files]
@="{474C98EE-CF3D-41f5-80E3-4AAB0AB04301}"

[HKEY_CLASSES_ROOT\Folder\ShellEx\ContextMenuHandlers\WinRAR]
@="{B41DB860-8EE4-11D2-9906-E49FADC173CA}"

[HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers]

[HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers\WinRAR]
@="{B41DB860-8EE4-11D2-9906-E49FADC173CA}"

[HKEY_CLASSES_ROOT\Folder\ShellEx\DragDropHandlers\{BD472F60-27FA-11cf-B8B4-444553540000}]
@=""

[HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers]

[HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\BriefcasePage]
@="{85BBD920-42A0-1069-A2E4-08002B30309D}"

[HKEY_CLASSES_ROOT\Folder\ShellEx\PropertySheetHandlers\Offline Files]
@="{7EFA68C6-086B-43e1-A2D2-55A113531240}"

[HKEY_CLASSES_ROOT\Folder\ShellNew]
"Directory"=""
"IconPath"=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,\
74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,\
00,68,00,65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,2c,00,33,00,\
00,00
"ItemName"="@shell32.dll,-30396"
"MenuText"="@shell32.dll,-30317"
"NonLFNFileSpec"="@shell32.dll,-30319"

[HKEY_CLASSES_ROOT\Folder\ShellNew\Config]
"AllDrives"=""
"IsFolder"=""
"NoExtension"=""

上面的没有写msc 文件注册表,导致msc文件打开后 还是cmd dos 框

MSC文件是Microsoft 通用管理文档,要用MMC.EXE程序打开,该程序位于SYSTEM32目录内,如你的系统在C盘,那位置为c:\windows\system32
你可以在MSC文件上点右键,属性--打开方式---更改--浏览 ----始终使用该程序打开这种文件
你也可以新建一个文本文件把以下代码复制进去保存后把该文本文件的后缀由TXT改为REG,再导入即可。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\MSCFile\Shell\Open\Command]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,6d,00,6d,00,\
63,00,2e,00,65,00,78,00,65,00,20,00,22,00,25,00,31,00,22,00,20,00,25,00,2a,\
00,00,00