Wacky_rubia

assocx

Dec 16th, 2013
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. @echo off
  2. if "%1"=="/?" (
  3. echo this is assocx
  4. goto:eof
  5. )
  6. set per=""
  7. set asd=.%1
  8. for /f "tokens=4" %%i in ('reg query "HKCR\%asd%" /ve ^2^>nul') do (
  9. set per=%%i
  10. )
  11. if %per% == "" (
  12. echo Fail
  13. goto :eof
  14. )
  15. for /f "delims=\ tokens=4 " %%i in ('reg query "HKCR\%per%\shell"') do (
  16. for /f "tokens=4,*" %%a in ('reg query "HKCR\%per%\shell\%%i\command" /ve') do (
  17. echo %%i %%a %%b
  18. )
  19. )
Advertisement
Add Comment
Please, Sign In to add comment