'THINSTALL_RUNTIME_SCRIPT
'This script will delete all *.dat file found in your application directory during uninstall
Function OnUninstallEnd
Set objFSO = CreateObject("Scripting.FileSystemObject")
my_exe_dir = ExpandPath("%InstallPath%")
set folder = objFSO.GetFolder(my_exe_dir)
set file_list = folder.Files
For Each fl in file_list
'see if this is a .dat file
found_pos = InStr(fl.name, ".dat")
'make sure .dat is at the end of the filename
if found_pos = Len(fl.name)-3 then
s = my_exe_dir + "\" + fl.name
objFSO.DeleteFile(s)
end if
Next
end function