本帖最后由 flashercs 于 2020-6-5 15:15 编辑
- @echo off
- %1 %2
- Set LogFile="C:\Users\bin\Desktop\logkey.txt"
- If Exist %LogFile% Del %LogFile%
-
- echo ::Check_Key
- For /f "delims=" %%K in ('"%~f0" goto mykey') Do Call :Check_Key %%K %LogFile%
-
- echo ::start %LogFile%
- Start "" %LogFile%
- Exit /b
-
- :mykey
- echo "HKEY_LOCAL_MACHINE\SOFTWARE\123\1"
- echo "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\MediaFoundation\Transforms\Categories\d6c02d4b-6833-45b4-971a-05a4b04bab91\0e799a91-cddc-471b-a803-2db82fafb726"
- echo "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\MediaFoundation\Transforms\Categories\d6c02d4b-6833-45b4-971a-05a4b04bab91\17796aeb-0f66-4663-b8fb-99cbee0224ce"
- echo "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\MediaFoundation\Transforms\Categories\d6c02d4b-6833-45b4-971a-05a4b04bab91\8c00c8ce-a6ba-442f-9185-2d68e4fca8eb"
- exit /b
-
- :Check_Key
- reg QUERY %1 >nul 2>&1
- (
- if %errorlevel% equ 0 ( echo %1 ===^> Found && reg QUERY %1
- ) else ( echo %1 ===^> Not found
- )
- ) >>%2 2>&1
复制代码
|