NormanHuth

Add context menu item

Aug 30th, 2021 (edited)
417
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.74 KB | None | 0 0
  1. goto comment
  2.  
  3.     /*
  4.     |--------------------------------------------------------------------------
  5.     | Instruction
  6.     |--------------------------------------------------------------------------
  7.     |
  8.     | * With Notepadd++
  9.     | * [For specialchars and Umlauts] `Encoding` => `Convert to ANSI`
  10.     | * [For specialchars and Umlauts] `Language` => `M` => `MS-Dos Style`
  11.     | * Set `FileLocation`, `ItemText and `ItemNamespace`
  12.     | * Save file as *.bat
  13.     | * Run file as Administrator
  14.     |
  15.     */
  16.  
  17. :comment
  18. @echo off
  19.  
  20. SET "FileLocation=C:\Users\norma\OneDrive\Dokumente\Sync\Mp3tag\Mp3tag.exe"
  21. SET "ItemText=In Mp3tag öffnen"
  22. SET "ItemNamespace=Mp3tag"
  23.  
  24. echo Adding file entries
  25. @reg add "HKEY_CLASSES_ROOT\*\shell\%ItemNamespace%" /t REG_SZ /v "" /d "%ItemText%"   /f
  26. @reg add "HKEY_CLASSES_ROOT\*\shell\%ItemNamespace%" /t REG_EXPAND_SZ /v "Icon" /d "%FileLocation%,0" /f
  27. @reg add "HKEY_CLASSES_ROOT\*\shell\%ItemNamespace%\command" /t REG_SZ /v "" /d "%FileLocation% \"%%1\"" /f
  28.  
  29. echo Adding within a folder entries
  30. @reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\%ItemNamespace%" /t REG_SZ /v "" /d "%ItemText%"   /f
  31. @reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\%ItemNamespace%" /t REG_EXPAND_SZ /v "Icon" /d "%FileLocation%,0" /f
  32. @reg add "HKEY_CLASSES_ROOT\Directory\Background\shell\%ItemNamespace%\command" /t REG_SZ /v "" /d "%FileLocation% \"%%V\"" /f
  33.  
  34. echo Adding folder entries
  35. @reg add "HKEY_CLASSES_ROOT\Directory\shell\%ItemNamespace%" /t REG_SZ /v "" /d "%ItemText%"   /f
  36. @reg add "HKEY_CLASSES_ROOT\Directory\shell\%ItemNamespace%" /t REG_EXPAND_SZ /v "Icon" /d "%FileLocation%,0" /f
  37. @reg add "HKEY_CLASSES_ROOT\Directory\shell\%ItemNamespace%\command" /t REG_SZ /v "" /d "%FileLocation% \"%%1\"" /f
Add Comment
Please, Sign In to add comment