pascalscript

Encode string to Base64 in Inno Setup (Unicode Version of Inno Setup)

天大地大妈咪最大 提交于 2019-12-06 14:45:57
Problem I tried to use the Pascal function EncodeStringBase64 , assuming Inno Setup had access to the Pascal standard library but it fails to find it and provides an Unknown Identifier error. https://www.freepascal.org/docs-html/fcl/base64/encodestringbase64.html I also found this code to carry out the conversion but it seems to be restricted to AnsiStrings. https://github.com/docker/toolbox/blob/master/windows/base64.iss Question Ideally I'd like to use the standard library function, is there any way that I can access it? If not, is the code using AnsiStrings safe to use on normal Unicode

Inno Setup - Define Disk Space by component

China☆狼群 提交于 2019-12-06 14:45:06
问题 By default, on the components page, Inno Setup adds the size of all the files inside to the size of the selected component (shows on the bottom of the page). Now, I specifically need Inno Setup to require exactly as much as the current component's size is. How can I achieve that? New code: [Setup] AppName=Dagon Video Tools AppVersion=1.0 AppVerName=Dagon Video Tools DefaultDirName={sd}\Tools\Dagon Video Tools VersionInfoProductName=Dagon Video Tools WizardImageFile=Include\WizardImage.bmp

Can't get package references registered to an instance of Visual Studio 17 and above from Pascal Script

一世执手 提交于 2019-12-06 14:42:46
问题 I need to define whether a specific extension is installed in Visual Studio 2017. I can get package references registered to the instance of VS using Microsoft.VisualStudio.Setup.Configuration.Interop with C#. Here is example of the working code: var query = (ISetupConfiguration2) new SetupConfiguration(); var e = query.EnumInstances(); int fetched; var instances = new ISetupInstance[1]; do { e.Next(1, instances, out fetched); if (fetched <= 0) continue; ISetupInstance2 instance = instances[0

Inno Setup Set Uninstallable directive based on custom checkbox value

☆樱花仙子☆ 提交于 2019-12-06 13:57:28
问题 I want to know, how to use Uninstallable directive, when I don't have tasks or components: [Setup] Uninstallable:not if IscomponentSelected ('comp1 comp2') I don't have tasks or components created. I only created some checkboxes with a "portable" option, which I want to add uninstallable option, when that one is checked: [Code] var Component: TWizardPage; portable,installer: TNewRadioButton; Copmp: TLabel; function install: Boolean; begin Result := installer.Checked; end; function portab:

Check parameter function in UninstallRun does not work correctly

﹥>﹥吖頭↗ 提交于 2019-12-06 13:44:33
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 CheckGetFile: boolean; begin if (Check) then begin log('Found File'); Result := true; end; if (not

How to find an unique name to rename/archive old directories in Inno Setup

▼魔方 西西 提交于 2019-12-06 13:30:32
问题 Whenever I do a new install, I install a new directory. I am having issues with installing over old directories and would now like to archive my old directories. If DirExists returns true, I want to rename the directory from Directory to DirectoryOld1 . The issue I am having is how to check and iterate through the renaming process, so that if DirectoryOld1 exists, rename the current directory to DirectoryOld2 and so on. 回答1: If I understand your question correctly, you want to backup an

Add image into the components list - component description

痴心易碎 提交于 2019-12-06 13:21:30
问题 I would like to display a little image, when user hovers mouse cursor over a component on the "Select Components" page. For example, I would like to do something like this: I found a half solution here: Long descriptions on Inno Setup components. But I'm missing the image part. 回答1: Building upon my answer to Long descriptions on Inno Setup components. You will need to copy HoverTimerProc and its supporting functions and global variables. This answer modifies the HoverComponentChanged and

Inno Setup - Identify, what tasks correspond to the items of TaskList (to show text on mouse over for certain tasks only)

元气小坏坏 提交于 2019-12-06 13:02:08
So, I have these comtools tasks, which, as you can see, can have a different position in the tasks list, depending on which components were previously chosen. Moreover, they may not exist at all, if the user doesn't wish to install those components. What I need is static text shown, but only when the cursor hovers over the comtools tasks. [Tasks] Name: "acorig"; Description: "ac original"; GroupDescription: "Choose which version of ac to install:"; Flags: exclusive; Components: ac Name: "acenh"; Description: "ac enhanced"; GroupDescription: "Choose which version of ac to install:"; Flags:

Inno Setup get Min and Max Integer values in Pascal Script

北战南征 提交于 2019-12-06 13:01:06
问题 I need to return min and max values of two Integers in many situations in my Pascal Script. But every time I need to create a TStringList , add my two or more Integers to it and convert it to an Array Of String and then get its min and max values using two of my functions called ArrayOfStringMax and ArrayOfStringMin. I like to have two functions like Min and Max to make this easier like unit Math in Delphi. For example, Log(IntToStr(Min(1000, 26))); Output should be 26 . Log(IntToStr(Max(45,

Inno Setup unable to find and execute ie4uinit.exe on x64 [duplicate]

只愿长相守 提交于 2019-12-06 12:49:43
问题 This question already has answers here : A command in a .bat file is unrecognized when the .bat file is called from an Inno Setup but works fine when I run the bat file manually (2 answers) Closed 2 years ago . I am trying to refresh the Windows icon cache using the well known and documented method of calling ie4uinit.exe -ClearIconCache for anything below Window 10 and ie4uinit.exe -Show on Windows 10 and above: [Run] Filename: "{sys}\ie4uinit.exe"; Parameters: "-ClearIconCache"; StatusMsg: