patriciaxxx
Programmer
I am trying to add sdelete.exe to the right click menu in Windows XP Sp3 for all files including shortcuts and all folders but not objects on the desktop like Recycle Bin, My Documents, My Computer etc.
What I would really like is a shell extension that adds it in complete with icon but my research tells me I would need to write a dll program to create the custom Context Menu Handler then I would have the GUID key to reference it in the registry. But hey enough about this solution I do not have the knowledge to write such a dll and unless someone else has and can post a link to it then I must proceed with the following solution.
All the tutorials on the web that I can find say that the following registry entry will add “Permanently Delete” to the upper most group of the right click menu in XP.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Permanently Delete]
[HKEY_CLASSES_ROOT\*\shell\Permanently Delete\command]
@="\"sdelete.exe\" /p 1 /s \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\Permanently Delete]
"Icon"="imageres.dll,-89"
"position"="Bottom"
[HKEY_CLASSES_ROOT\Directory\shell\Permanently Delete\command]
@="\"sdelete.exe\" /p 1 /s \"%1\""
But I have found a problem with potentially disastrous results. It concerns the default menu value for whatever you clicked on ie folder, file, shortcut etc the registry edit seems to change this and assume the default and I can not find a way to make it right. I am aware of the Folder Options… File Types set Default procedure but this is something else and does not help with this registry entry.
When I right click on a folder the top part of the menu looks like this:-
Before registry key added.
Open
Explore
Search…
--line separator—
After registry key added.
Permanently Delete
Open
Explore
Search…
--line separator—
but if I change the following “Directory” with “Folder” it seems to work. So why is that, why do all the articles say to use “Directory” and which is correct:-
[HKEY_CLASSES_ROOT\Folder\shell\Permanently Delete]
"Icon"="imageres.dll,-89"
"position"="Bottom"
[HKEY_CLASSES_ROOT\Folder\shell\Permanently Delete\command]
@="\"sdelete.exe\" /p 1 /s \"%1\""
Before registry key added..
Open
Explore
Search…
--line separator—
After registry key added
Open
Explore
Search…
Permanently Delete
--line separator—
and when I right click on a file its just as confusing because if there is more than one entry in the upper most group then “Permanently Delete” is added beneath them which is correct but if there is only one entry for example “Open With…” then it is added above this and in bold which is default value and not at all what we want.
Before registry key added.
Open With…
--line separator—
After registry key added.
Permanently Delete
Open With…
--line separator—
As the default ie bold menu items are those which are executed not only on right click and select but also on simply double clicking the item then you can very easily delete files instantly.
If any one knows how to create the registry entry correctly so that it works properly all the time for all files, folders and shortcuts except desktop objects as mentioned this would be a great help.
What I would really like is a shell extension that adds it in complete with icon but my research tells me I would need to write a dll program to create the custom Context Menu Handler then I would have the GUID key to reference it in the registry. But hey enough about this solution I do not have the knowledge to write such a dll and unless someone else has and can post a link to it then I must proceed with the following solution.
All the tutorials on the web that I can find say that the following registry entry will add “Permanently Delete” to the upper most group of the right click menu in XP.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\Permanently Delete]
[HKEY_CLASSES_ROOT\*\shell\Permanently Delete\command]
@="\"sdelete.exe\" /p 1 /s \"%1\""
[HKEY_CLASSES_ROOT\Directory\shell\Permanently Delete]
"Icon"="imageres.dll,-89"
"position"="Bottom"
[HKEY_CLASSES_ROOT\Directory\shell\Permanently Delete\command]
@="\"sdelete.exe\" /p 1 /s \"%1\""
But I have found a problem with potentially disastrous results. It concerns the default menu value for whatever you clicked on ie folder, file, shortcut etc the registry edit seems to change this and assume the default and I can not find a way to make it right. I am aware of the Folder Options… File Types set Default procedure but this is something else and does not help with this registry entry.
When I right click on a folder the top part of the menu looks like this:-
Before registry key added.
Open
Explore
Search…
--line separator—
After registry key added.
Permanently Delete
Open
Explore
Search…
--line separator—
but if I change the following “Directory” with “Folder” it seems to work. So why is that, why do all the articles say to use “Directory” and which is correct:-
[HKEY_CLASSES_ROOT\Folder\shell\Permanently Delete]
"Icon"="imageres.dll,-89"
"position"="Bottom"
[HKEY_CLASSES_ROOT\Folder\shell\Permanently Delete\command]
@="\"sdelete.exe\" /p 1 /s \"%1\""
Before registry key added..
Open
Explore
Search…
--line separator—
After registry key added
Open
Explore
Search…
Permanently Delete
--line separator—
and when I right click on a file its just as confusing because if there is more than one entry in the upper most group then “Permanently Delete” is added beneath them which is correct but if there is only one entry for example “Open With…” then it is added above this and in bold which is default value and not at all what we want.
Before registry key added.
Open With…
--line separator—
After registry key added.
Permanently Delete
Open With…
--line separator—
As the default ie bold menu items are those which are executed not only on right click and select but also on simply double clicking the item then you can very easily delete files instantly.
If any one knows how to create the registry entry correctly so that it works properly all the time for all files, folders and shortcuts except desktop objects as mentioned this would be a great help.