本帖最后由 aa77dd@163.com 于 2016-10-21 22:04 编辑
回复 4# huyou96
下面代码中筛选规则不是很严谨的, 但没有人为设置特别的情况, 应该是可用的- @echo off & setlocal enableDelayedExpansion
- chcp 437
- mode 200
-
- for /f delims^= %%a in (^
- 'reg query HKCU\SOFTWARE\Classes\CLSID /s /v "System.IsPinnedToNameSpaceTree" ^
- | findstr /r /i /c:"HKEY_CURRENT_USER\\SOFTWARE\\Classes\\CLSID\\{........-....-....-....-............}"'
- ) do (
-
- >nul (reg query "%%a" | findstr /v /r "^$" | findstr /v "System.IsPinnedToNameSpaceTree HKEY_CURRENT_USER") && echo;exclude || (
-
- >nul (reg query "%%a" /ve | find /i "(Default) REG_SZ (value not set)") && (
- for /f tokens^=1-5delims^=\ %%A in ("%%a") do (
- set "key=%%A\%%B\%%C\%%D\%%E"
- echo;key=!key!
- )
- )
-
- )
- )
-
- pause
-
- exit /b
复制代码
|