inno-setup

Inno Setup: Suppress warning if other component selected

ⅰ亾dé卋堺 提交于 2020-01-02 19:19:31
问题 In [Components] I have two components (say A and B) defined exclusive . In fact the two components are not really components but two versions of the application configuration the user must choose from. Assume the user has installed my application with component A chosen. If the user installs an update of my application this time choosing component B a warning box pops up that says Setup has detected that the following components are already installed on your .... Deselecting these components

Basic email validation within Inno Setup script

試著忘記壹切 提交于 2020-01-02 18:26:00
问题 I'm wanting to do a basic string validation within an Inno Setup script to be relatively certain the string is an email address. I just want to see that there is a '@' character followed by a '.' character and that there is at least one character on either side of these. Something similar to this regular expression: [^@]+@.+\.[^\.] The lack of regular expressions and limited string functions available in object pascal are causing me grief. It would be simple enough to reverse the string, find

Check parameter function in UninstallRun does not work correctly

雨燕双飞 提交于 2020-01-02 14:07:53
问题 I would like to get parameter from [Code] section in [UninstallRun] section. I got "not found" in Debug Output when installing . I didn't call CheckGetFile() when installing...and it didn't call GetFilePath() and CheckGetFile() when Uninstalling..WHY? Here is my script [Code] Var Check: Boolean; function GetFilePath(Default: String): String; begin log('GetFilePath()'); Check := false; Result := ''; { do something } if (Found) then begin Check := true; Result := TargetPath; end; end; function

Inno Setup - How to validate serial number online

旧城冷巷雨未停 提交于 2020-01-02 10:21:58
问题 Using Inno Setup, setup.exe was given to a client, according to contract he is allowed only to use 2016 and 2017. But on 01-01-2018 he should not be able to continue with same serial 2017. How to make the setup.exe by innosetup limited to from and to date? [Setup] #define SerialNumber "2017" UserInfoPage=yes [Code] function CheckSerial(Serial: String): Boolean; begin Result := Serial = '{#SerialNumber}'; end; setup.exe is executed license key is inserted after submit, i want to check URL

Use a part of a registry key/value in the Inno Setup script

别等时光非礼了梦想. 提交于 2020-01-02 10:18:50
问题 I have a need to retrieve a path to be used for some stuffs in the installer according an other application previously installed on the system. This previous application hosts a service and only provides one registry key/value hosting this information: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\APPLICATION hosting the value ImagePath which Data is "E:\TestingDir\Filename.exe" . I need a way to only extract the installation path ( E:\TestingDir ) without the Filename.exe file. Any

Use a part of a registry key/value in the Inno Setup script

偶尔善良 提交于 2020-01-02 10:18:14
问题 I have a need to retrieve a path to be used for some stuffs in the installer according an other application previously installed on the system. This previous application hosts a service and only provides one registry key/value hosting this information: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\APPLICATION hosting the value ImagePath which Data is "E:\TestingDir\Filename.exe" . I need a way to only extract the installation path ( E:\TestingDir ) without the Filename.exe file. Any

Difference between Inno Setup and Launch4j

こ雲淡風輕ζ 提交于 2020-01-02 10:00:27
问题 I want to create a package for my Java application. The application has a GUI. I am confused about the difference between the Inno Setup and the Launch4j. My main question is does Inno Setup also create an .exe file like the Launch4j? Or do I need to create the .exe file with Launch4j and package the application with the Inno Setup? 回答1: Inno setup output is an installer as it is an installer maker. In the other hand launch4j is a wrapper to convert a jar into a exe. So if you want to

Can you define a function prototype in Inno Setup

大城市里の小女人 提交于 2020-01-02 08:11:55
问题 I would like to be able to structure my code for my Inno Setup project but I am forced to move code around because you can't call a function unless it is defined first. Is there a way to declare a prototype at the top so that I don't get the "Unknown identifier" error and so that I can structure my code in logical blocks. 回答1: In Pascal (including a Pascal Script used in Inno Setup), you can define a function prototype (aka forward declaration) using a forward keyword: procedure ProcA(ParamA:

Avoiding “Failed to expand shell folder constant userdocs” errors in Inno Setup

老子叫甜甜 提交于 2020-01-02 06:00:37
问题 I install some sample documents into a 'PerfectTablePlan' sub-folder of the standard 'My documents' folder on Windows. This works fine for 99%+ of users. But if a user doesn't have a 'My documents' folder I get a number of ugly error messages of the form: Internal error:Failed to expand shell folder constant “userdocs” This is not very confidence inspiring for the user! It is acceptable to not install the samples for these users (or install them somewhere else). But not to show the ugly error

How to show progress during “PrepareToInstall”?

一世执手 提交于 2020-01-02 04:41:13
问题 An installer I'm working on does most of its work in the PrepareToInstall function, as everything I need to do might fail, and therefore this is the appropriate place to handle these things in case they do fail. Any failure can be automatically reported by passing the error message in the function's result. There are only 3 small files which the installer actually copies over. The problem is that the wizard seems to freeze (or not respond rather) during this function, just showing a blank