UninsHs 3.1 for Inno Setup Readme

Thank you for choosing a Han-soft Software prouduct! This extension for Inno Setup allows you to easily add "Repair/Modify/Remove" options to your installed applications.

Note: You are required to add a link to our website in your product page if you use the UninsHs in any of your application. Or purchase a commercial license if you cannot add the link.

Usage:

  1. Prepartory step:

    Copy the files uninshs.iss, modify.bmp, repair.bmp, and remove.bmp to your installation script folder or a sub-folder in it.

  2. Change the [Setup] section:
  3. Customize the icons for "Repair/Modify/Remove" options (optional)

    If you want to customize the icons for "Repair/Modify/Remove" options, please create three 32*32 bitmap files for these options:

    Define the UninsHs_ImageFilesDir macro before including the uninshs.iss file, set its value to the folder of these bitmap files. For example:

    #define UninsHs_ImageFilesDir AddBackslash(SourcePath) + 'images'

  4. Customize the backup folder for installation package (optional)

    The install package will be saved to computer during the installation, in order to execute the "Repair/Modify/Remove" operation for the future. You can use the UninsHs_BackupDir marco to define the target folder. By default, it is {commonappdata}\$UninsHs$. Please define it before including the uninshs.iss file. For example:

    #define UninsHs_BackupDir "{commonappdata}\$UninsHs$"

  5. Include the uninshs.iss file:

    Please include the uninshs.iss file at the end of any section, but the [Code] section. If the file is placed in the sub-folder of your installation scripts folder, please add path of the sub-folder in order to locate it. For exampe:

    [Setup]
    ......
    #include "uninshs.iss"
    [Files]
    ......

    Note: Don't include it in the [Code] section. The following code doesn't work:

    ......
    [Code]
    ......
    #include "uninshs.iss"
    ......

    Note: Please include it at the end of the section. The following code doesn't work:

    [Setup]
    ......
    #include "uninshs.iss"
    ......
    [Files]
    ......

  6. Create an uninstall icon in start menu (optional)

    Please use the default method of Inno Setup to create the uninstall icon, add the {uninstallexe} constant in the Filename parameter of an [Icons] section entry. For example:

    [Icons]
    ......
    Name: "{group}\Uninstall My Application"; \
      Filename: "{uninstallexe}";
    ......

    Also, you can use the command line parameters to specify the default option, the "Remove" option will be checked if you don't use these parameters:

    For example:

    [Icons]
    ......
    Name: "{group}\Modify My Application"; \
      Filename: "{uninstallexe}"; \
      Parameters: "/MODIFY";
    ......

  7. Changes the [Code] section:
  8. Changes the [Components] section:

    Add the DisableNoUninstallWarning flag to your component lines which does not have a Fixed flag (these file may be removed at executing the "Modify" operation). For example:

    [Components]
    ......
    Name: "help"; \
      Description: "Help Files"; \
      Types: full; \
      Flags: DisableNoUninstallWarning;
    ......

  9. Changes the [InstallDelete] section:

    Add entries to delete the files and diretories which do not have a Fixed flag in the [Components] section (these file may be removed at executing the "Modify" operation). For example:

    [InstallDelete]
    ......
    Type: files; Name: "{app}\Help.chm"
    ......

  10. Changes the [Run] section:

    Append the check: UninsHs_IsInstallation(); parameter to lines that include the postinstall parameter. For example:

    [Run]
    ......
    FileName: "{app}\readme.txt"; \
      Description: "Open the Readme file"; \
      WorkingDir: "{app}"; \
      Verb: open; \
      Flags: shellexec skipifdoesntexist nowait skipifsilent postinstall; \
      Check: UninsHs_IsInstallation();
    ......

  11. Supports the multilingual installation

    If you want to create a multilingual installation package, please use the [Languages] section defines the languages to make available to it. See also the Inno Setup Help document. For example:

    [Languages]
    Name: "en"; MessagesFile: "compiler:Default.isl"
    Name: "fr"; MessagesFile: "compiler:Languages\French.isl"

    Then translate the following messages for every language, and add them into the [CustomMessages] section. Note, in the UninsHs.iss script, the default custom messages are defined (it's written in English, so the English messages isn't required). In the multilingual installation package, for every language, if you don't define the custom messages, the default custom messages will be used.

    MaintenancePageCaption =%1 Program maintenance
    MaintenancePageDescription =Modify, repair, or remove the %1 program.
    Modify =&Modify
    Repair =&Repair
    Remove =Re&move
    ModifyInfo =Change which program features are installed. This option displays the Custom \
      Selection dialog where you can change the way features are installed.

    RepairInfo =Repair errors in the program. This option fixes missing or corrupt files, \
      shortcuts, and registry entries.

    RemoveInfo =Remove the program from your computer.
    ReadyToRepair =Click on the <Next> button to repair the program.
    ReadyToRemove =Click on the <Next> button to remove the program from your computer.

    For example, add the following messages to support the French:

    [CustomMessages]
    fr.MaintenancePageCaption =Maintenance de l'application %1
    fr.MaintenancePageDescription =Modifier, réparer, ou supprimer l'application %1.
    fr.Modify =&Modifier
    fr.Repair =&Réparer
    fr.Remove =&Supprimer
    fr.ModifyInfo =Change les composants installés de l'application. Cette option affiche \
      la boîte de dialogue dans laquelle vous pouvez changer les composants installés.

    fr.RepairInfo =Répare les erreurs de l'application. Cette opération répare les fichiers \
      manquants ou corrompus, les raccourcis et les entrées de la base de registre.

    fr.RemoveInfo =Entfernt das Programm von Ihrem Computer.
    fr.ReadyToRepair =Veuillez appuyer sur <Suivant> pour réparer l'application.
    fr.ReadyToRemove =Veuillez appuyer sur <Suivant> pour supprimer l'application de votre \
      ordinateur.

    Note: If the English messages are not required, or you want to define your own default custom messages in your script, you can define the Disable_UninsHs_Default_CustomMessages macro before including the uninshs.iss file, they will not be included in your installation package. Optional, you can define your own default custom messages in your script. For example:

    [Setup]
    ......
    #define Disable_UninsHs_Default_CustomMessages
    #include "uninshs.iss"
    [Files]
    ......
    [CustomMessages]
    ; French custom messages
    fr.MaintenancePageCaption =Maintenance de l'application %1
    fr.MaintenancePageDescription =Modifier, réparer, ou supprimer l'application %1.
    ...

    ; Chinese custom messages
    chs.MaintenancePageCaption =%s 维护程序
    chs.MaintenancePageDescription =改变组件,修复,或者卸载该程序。
    ...

    ; Optional, define your own default custom messages (here is in German)
    MaintenancePageCaption =%s Anwendungsverwaltung
    MaintenancePageDescription =Wählen Sie den auszuführenden verwaltungsvorgang.
    ...

    Note, if you don't disable the default custom messages, please define your custom messages after the section which the uninshs.iss file is included in it.

Congratulations!

Compile your setup script and watch the new uninstall at work! If it doesn't work, please add a link to our website in your web page, then contact us and send your link page to us.

Note: You are required to add a link to our website in your product page if you use the UninsHs in any of your application.


Copyright © 2001, 2019 Han-soft software, all rights reserved. (Version: 3.1.0.344)