How to Implement Uninstall Feedback in InnoSetup

If user is uninstalling your application, it is reasonable to ask him what he did not liked in the application. Usually developers open web browser for submission of feedback.

I think this is not a good practise — most users do not like applications opening web browser without their confirmation. My opinion it is a lot better to implement sending of such kind of feedback using desktop's regular mail application, such as Outlook and Thunderbird.

For example, this is IndieVolume Uninstall Feedback window:

Screenshot of IndieVolume Uninstall Feedback

This is InnoSetup pascal code I have developed to implement above window:

#include "fixfonts.iss"
#include "feedback.iss"

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  if CurUninstallStep = usUninstall then
  begin
    UninstallFeedback('IndieVolume Uninstall Feedback', 'Send', 'Cancel',
      'To help us with future versions of IndieVolume, we want to know about any troubles or difficulties you have experienced while using IndieVolume.'#13#10  +
      ''#13#10'Please let us know why are you uninstalling IndieVolume. Thank You.',
      'support@gerixsoft.com', 'IndieVolume Uninstall Feedback');
  end;
end;                

 Attached you can find feedback.iss. For fixfonts.iss see this post

AttachmentSize
feedback.iss3.69 KB

Comments

Good morning, I work about a

Good morning,

I work about a same idea: i need to send a mail to administrator since the installation, your code will help me but i must to add a attachement in this mail, i m not an expert in inno setup and i hope to have a help for to add this attachement.

thanks regards.

You need to write small DLL

You need to write small DLL that does the job, then put the following lines to your .iss file:

[Files]
Source: SendMail.dll; DestDir: {app}
[Code]
function SendMail(Email: PChar; Subject: PChar; Message: PChar; Attachments: PChar): Integer; external 'SendMail@{app}\SendMail.dll stdcall uninstallonly';

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
...

begin     
  if CurUninstallStep = usUninstall then     
  begin
    ...
    Status := SendMail(...);
    ...
    UnloadDLL(ExpandConstant('{app}\SendMail.dll')); // UnloadDLL is necessary for uninstaller to finish
  end;
end;

SendMail.dll is name of the DLL doing the job.

hi your example shows how to

hi
your example shows how to open the mail window but no how to send it.
Do you know how to know if the user really sent the mail (retrieve the event or force mailing ?)
thanks regards.

Post new comment

The content of this field is kept private and will not be shown publicly.