Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal
- if "%1"=="*" (
- set temp=*
- goto:start)
- reg query HKCR\.%1 1>nul 2>nul
- if %errorlevel%==1 goto:error
- for /F "tokens=4* delims= " %%i in ('reg QUERY "HKCR\.%1" /ve') do (
- set temp=%%i
- ) 2>nul
- echo %temp%
- :start
- for /F "tokens=4 delims=\" %%a in ('reg QUERY "HKCR\%temp%\shell" 2^>nul') do (
- for /F "tokens=3*" %%i in ('reg query "HKCR\%temp%\shell\%%a\command" /ve 2^>nul') do echo %%a: %%j ) 2>nul
- if %errorlevel%==1 goto :error
- exit /b
- :error
- echo this file not exist
- goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement