How can I override or customize the uninstall confirmation dialog in Windows?

When we press the Shift+ key Delete, a delete confirmation dialog is created. I want to process this dialog according to my need or change its message. Can anyone tell me who is responsible for this dialogue?

I need to know the code that handles the delete confirmation dialog generated by the Shift+ key chain Deletein Windows XP, or the code with which we can control this operation.

+1


source to share


3 answers


I don't think what you want to do, it will be fun.

Im guessing you need to intercept the SHFileOperation function (and the IFileOperation interface for Vista)

This is what my google-fu got me on hijacking winapi: http://www.codeproject.com/kb/system/hooksys.aspx



You can take a look at this: http://easyhook.codeplex.com/

This project supports extending (intercepting) unmanaged code (API) from pure managed, from fully managed environment such as C #, using Windows 2000 SP4 and later ...

Good luck! =)

+3


source


If you only want to mess up the dialog (change the displayed text, image, etc.), you can try changing resources with a free tool like Resource Hacker .

The uninstall dialog resources are found in the shell32.dll file on Windows XP (you only mentioned that version of Windows); run Resource Hacker and open the shell32.dll file, then look for the warning text "Are you sure you want to delete" and you will find:



CONTROL "Are you sure you want to delete '%1'?", 12295, STATIC, SS_LEFT | SS_NOPREFIX | WS_CHILD | WS_VISIBLE | WS_GROUP, 41, 10, 220, 28

      

Now that should be only static text, but all dialog definition (buttons, etc.). I think that you can do it with a simple warning dialog - for example. "You are forbidden to delete anything!" and only the Cancel button.

+1


source


One way to overcome restrictions on file deletion is to use NTFS security descriptors.

This way you change it in one place and don't have to worry about covering all cases to prevent the file from being deleted.

0


source







All Articles