Skip to content

Instantly share code, notes, and snippets.

@eggbean
Last active April 25, 2024 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save eggbean/315355ecdf17c41347e835ffafd08326 to your computer and use it in GitHub Desktop.
Save eggbean/315355ecdf17c41347e835ffafd08326 to your computer and use it in GitHub Desktop.
WinDirStat registry file to add context menu entries to open on drives or folder, with a little icon
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\windirstat]
[HKEY_CLASSES_ROOT\Directory\Background\shell\windirstat]
@="Open WinDirStat here"
[HKEY_CLASSES_ROOT\Directory\Background\shell\windirstat]
"Icon"=hex(2):43,00,3A,00,5C,00,50,00,72,00,6F,00,67,00,72,00,61,00,6D,00,20,\
00,46,00,69,00,6C,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5C,00,\
57,00,69,00,6E,00,44,00,69,00,72,00,53,00,74,00,61,00,74,00,5C,00,77,00,69,\
00,6E,00,64,00,69,00,72,00,73,00,74,00,61,00,74,00,2E,00,65,00,78,00,65,00,\
2C,00,30,00
[HKEY_CLASSES_ROOT\Directory\Background\shell\windirstat\command]
@="C:\\Program Files (x86)\\WinDirStat\\windirstat.exe \"%1\""
[-HKEY_CLASSES_ROOT\Directory\shell\windirstat]
[HKEY_CLASSES_ROOT\Directory\shell\windirstat]
@="Open WinDirStat here"
[HKEY_CLASSES_ROOT\Directory\shell\windirstat]
"Icon"=hex(2):43,00,3A,00,5C,00,50,00,72,00,6F,00,67,00,72,00,61,00,6D,00,20,\
00,46,00,69,00,6C,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5C,00,\
57,00,69,00,6E,00,44,00,69,00,72,00,53,00,74,00,61,00,74,00,5C,00,77,00,69,\
00,6E,00,64,00,69,00,72,00,73,00,74,00,61,00,74,00,2E,00,65,00,78,00,65,00,\
2C,00,30,00
[HKEY_CLASSES_ROOT\Directory\shell\windirstat\command]
@="C:\\Program Files (x86)\\WinDirStat\\windirstat.exe \"%1\""
[-HKEY_CLASSES_ROOT\Drive\shell\windirstat]
[HKEY_CLASSES_ROOT\Drive\shell\windirstat]
@="Open WinDirStat here"
[HKEY_CLASSES_ROOT\Drive\shell\windirstat]
"Icon"=hex(2):43,00,3A,00,5C,00,50,00,72,00,6F,00,67,00,72,00,61,00,6D,00,20,\
00,46,00,69,00,6C,00,65,00,73,00,20,00,28,00,78,00,38,00,36,00,29,00,5C,00,\
57,00,69,00,6E,00,44,00,69,00,72,00,53,00,74,00,61,00,74,00,5C,00,77,00,69,\
00,6E,00,64,00,69,00,72,00,73,00,74,00,61,00,74,00,2E,00,65,00,78,00,65,00,\
2C,00,30,00
[HKEY_CLASSES_ROOT\Drive\shell\windirstat\command]
@="C:\\Program Files (x86)\\WinDirStat\\windirstat.exe \"%1\""
@opus-x
Copy link

opus-x commented Feb 15, 2024

Thanks for this. Helped me to implement the context menu. The entry for the drive is wrong though, since it would start scanning only your profile folder. You'll need to add some extra backslashes. I also removed the hex-values and used the path names instead.

See my version for a portable setup:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\windirstat]
@="Analyze with WinDirStat"
"Icon"="P:\\bin\\system-tools\\windirstat\\windirstat.exe,0"

[HKEY_CLASSES_ROOT\Directory\shell\windirstat\command]
@="P:\\bin\\system-tools\\windirstat\\windirstat.exe \"%1\""

[HKEY_CLASSES_ROOT\Drive\shell\windirstat]
@="Analyze with WinDirStat"
"Icon"="P:\\bin\\system-tools\\windirstat\\windirstat.exe,0"

[HKEY_CLASSES_ROOT\Drive\shell\windirstat\command]
@="P:\\bin\\system-tools\\windirstat\\windirstat.exe \"%1\\\""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment