Recent

Author Topic: Inno Setup Comiler - Rename the Uninstal file  (Read 1101 times)

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 449
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Inno Setup Comiler - Rename the Uninstal file
« on: March 27, 2026, 03:01:16 pm »
I am using Inno Setup Compiler 6.7.1 to create an Install app to install a finished app. Testing and have it working properly but reading what I think is suppose to work, doesn't work.  In the [Setup] section of my Inno [Setup] section I defined:

Code: Pascal  [Select][+][-]
  1. UninstallDisplayIcon={app}\ContactsMgt.ico
  2. UninstallDisplayName={app}\UnInstallContactsMgt.iss
  3.  

But when the Inno script or Inno ContactsMgtSetup.exe runs it creates the correct directory and installs the required files for the app but it creates 2 files named unins000.dat and unins000.exe.  How do I change my Inno to make these 2 files UnInstallContactsMgt.exe and .dat?

Thaddy

  • Hero Member
  • *****
  • Posts: 19258
  • Glad to be alive.
Re: Inno Setup Comiler - Rename the Uninstal file
« Reply #1 on: March 27, 2026, 03:06:24 pm »
Hm, long time since I used it, but uninstall.dat is the recording of the install process and the exe can read that and roll it back.
I don't think that has changed, but I may be wrong: You need BOTH.

That is because you can not write a generic uninstall without knowing how, where and what is installed.

If that can be combined in a single exe? Yes, if the uninstall data can be compiled as a resource. Dunno if that is an option for InnoSetup. It is technically possible, but then InnoSetup has to implement it. It would however tie it to a single machine, single install, so I wonder why you would want that: such an uninstall executable would likely work on one single and exclusive machine only.

« Last Edit: March 27, 2026, 03:15:57 pm by Thaddy »
objects are fine constructs. You can even initialize them with constructors.

mtrsoft

  • Jr. Member
  • **
  • Posts: 64
Re: Inno Setup Comiler - Rename the Uninstal file
« Reply #2 on: March 28, 2026, 05:15:49 am »
It is my understanding that the name of the uninstall executable and data files cannot be renamed.

The "DisplayName..." constant defines what will appear in the Control Panel when selecting a program to uninstall.

To be absolutely sure ask your question on the InnoSetup forum at:
https://groups.google.com/forum/#!forum/innosetup

1HuntnMan

  • Sr. Member
  • ****
  • Posts: 449
  • From Delphi 7 to Lazarus
    • NewFound Photo Art
Re: Inno Setup Comiler - Rename the Uninstal file
« Reply #3 on: March 30, 2026, 06:34:12 pm »
Yup, I figured that out, don't think you can rename those 2 files from what I've been reading.  I tested on a smaller app that I did quite a few years ago. This works the way I designed nicely, sharing if anyone wants to take a look...

Code: Pascal  [Select][+][-]
  1. ; -- ContactsMgt.iss --
  2. ; Copy/Install ContactsMgt.exe, DataBase Schema and also create the application icon.
  3. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING THE .ISS SCRIPT FILES!
  4. ; Install the ContacsMgt.exe, ContactsMgt.ico into C:\Contacts for Windows\ and also the
  5. ; SQLite3 database file (ContactsDB.sqlite3), report files and documentation into the
  6. ; same directory - drive:\Contacts for Windows\
  7.  
  8. #define MyAppName "Contacts for Windows"
  9. #define MyAppVersion "2.1.1.5"
  10. #define MyAppCopyright "(c) 2024-2026 NewFound Photo Art"
  11. #define MyAppPublisher "NewFound Photo Art, LLC"
  12. #define MyDefaultDirName "\Contacts for Windows"
  13. #define MyAppExeName "ContactsMgt.exe"
  14. #define StatusMsg "Installing Contacts for Windows..."
  15.  
  16. [Setup]
  17. ; AppID={{YOUR-GUID-HERE}}
  18. AppId={{D6F0F3E7-6C42-4E6D-A2A8-7E7C7D8C1234}
  19. ; AppName=Contacts for Windows
  20. AppName={#MyAppName}
  21. ; AppVersion=2.1.1.5
  22. AppVersion={#MyAppVersion}
  23. ; AppCopyright=(c) 2024-2026 NewFound Photo Art
  24. AppCopyright={#MyAppCopyright}
  25. ; AppPublisher=NewFound Photo Art, LLC
  26. AppPublisher={#MyAppPublisher}
  27. CreateAppDir=yes
  28. WizardStyle=modern
  29. ; DefaultDirName=\Contacts for Windows - Install into root\Contacts for Windows
  30. DefaultDirName={#MyDefaultDirName}
  31. ; DefaultGroupName=Contacts for Windows
  32. DefaultGroupName={#MyAppName}
  33. ; Uninstall display name
  34. UninstallDisplayName={#MyAppName}
  35. ; Uninstall icon
  36. UninstallDisplayIcon={app}\ContactsMgt.ico
  37. ; Uninstall log file name ...Inno should create shortcuts
  38. UninstallFilesDir={app}\Uninstall
  39. UninstallLogMode=append
  40. Compression=lzma
  41. SolidCompression=yes
  42. ; "ArchitecturesInstallIn64BitMode=x64os" requests that the install be
  43. ; done in "64-bit mode" on x64, meaning it should use the native
  44. ; 64-bit Program Files directory and the 64-bit view of the registry.
  45. ; On all other architectures it will install in "32-bit mode".
  46. ArchitecturesInstallIn64BitMode=x64compatible
  47. ; Installer output directory
  48. OutputDir=Installer ContactsMgt
  49. OutputBaseFilename=ContactsMgtSetup
  50. ; AppID
  51. ; AppID={{PUT-YOUR-GUID-HERE}}
  52.  
  53.  
  54. [Files]
  55. Source: "ContactsMgt.exe"; DestDir: "{app}"
  56. Source: "ContactsDB.sqlite3"; DestDir: "{app}"
  57. Source: "sqlite3.dll"; DestDir: "{app}"
  58. Source: "ContactsMgt.ico"; DestDir: "{app}"
  59. Source: "CntkAdressRpt.lrf"; DestDir: "{app}"
  60. Source: "CntksPhEmailRpt.lrf"; DestDir: "{app}"
  61. ; Source: "Contacts for Windows.lnk"; DestDir: "{app}"
  62. Source: "Contacts for Windows Documentation.doc"; DestDir: "{app}"
  63. Source: "Database Schema Contacts Mgt.doc"; DestDir: "{app}"
  64. Source: "ReadMe1st.txt"; DestDir: "{app}"
  65.  
  66. [Tasks]
  67. Name: "desktopicon"; Description: "Create a desktop icon"; GroupDescription: "Additional icons"; Flags: unchecked
  68.  
  69. [Icons]
  70. Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\ContactsMgt.ico"
  71. Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\ContactsMgt.ico"; Tasks: desktopicon
  72.  

 

TinyPortal © 2005-2018