how to get the message of delete files using hook?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Sorry for my poor english.
In windows2000, I want to disable users' ability to delete directories or
files in explorer. I want to use hook to catch the message when user click
"Yes" in the prompt dialog.
I am confusing which kind of hook to use,WH_GETMESSAGE or WH_SYSMSGFILTER?
And I don't know how to find the message that is created when user click
"delete".
I didn't find related code examples in my msdn.
Can anyone give me suggestion on how to do it and give code example?
Thank you very much.
 
Sorry for my poor english.
In windows2000, I want to disable users' ability to delete directories or
files in explorer. I want to use hook to catch the message when user click
"Yes" in the prompt dialog.
I am confusing which kind of hook to use,WH_GETMESSAGE or WH_SYSMSGFILTER?
And I don't know how to find the message that is created when user click
"delete".
I didn't find related code examples in my msdn.
Can anyone give me suggestion on how to do it and give code example?
Thank you very much.

Why not just give them a limited acount., that doesn't have permission
to delete the files/directories in question?
 
Liao_xf said:
Sorry for my poor english.
In windows2000, I want to disable users' ability to delete
directories or files in explorer. I want to use hook to catch the
message when user click "Yes" in the prompt dialog.
That's not the right way to achieve this goal, since the user :
- can delete via a command prompt.
- can have desactivated the confirmation box on it's explorer.
I am confusing which kind of hook to use,WH_GETMESSAGE or
WH_SYSMSGFILTER? And I don't know how to find the message that is
created when user click "delete".
Use Spy++ to se what happens to the dialog box, but once more time it's not
the right solution to your problem.

Arnaud
MVP - VC
 
Thank you,Serverian.
I know that NTFS can prevent the user from deleting the directory or file.
But it may have trouble if I use Ghost on a disk of NTFS format.
 
Thanks, Arnaud.
1. I can hide the cmd prompt from the user.
2. You mentioned disactived the confirmation dialog in Explorer.
Can you give me advice what way to disactive it?
 
Back
Top