pascalscript

Inno Setup - XML editing XPath request fails with “NIL Interface Exception at runtime”

亡梦爱人 提交于 2020-08-25 07:27:08
问题 I've created a Inno Setup script for my app in which I'm trying to edit some XML configuration in the post install step (mostly connection strings). I have some pretty simple XPath request but I have a runtime exception when using selectSingleNode whereas getElementsByTagName works perfectly fine. This code does not work. It throws "NIL Interface Exception at runtime" . procedure ReadValueFromXML(const AFileName, APath, AAttribute, AValue: string); var XMLNode: Variant; XMLDocument: Variant;

In Inno Setup, how do I center some text in the window?

折月煮酒 提交于 2020-08-24 12:00:26
问题 In Inno Setup, how do I center some text in the window? I tried making it a TLabel and setting the Alignment to taCenter but it didn't have any effect. I can set the Left and Top with no problems. 回答1: The Alignment property controls the horizontal placement of the text within the label. It's not used to position controls within their parent. Except Align property (which stretches controls to given space), there is no way to center controls to their parents. But you can make a function for

Possible to call DLL function in uninstaller if DLL has dontcopy flag?

若如初见. 提交于 2020-08-23 13:02:48
问题 As the title says I need a function in my DLL which I need to call while uninstalling. The DLL is included this way #define myProgData "C:\ProgramData\Foo\Bar" [Files] Source: "mydll.dll"; Flags: dontcopy I already use one function while installing and now I want to know if I can use the same DLL for uninstall or does the DLL have to be copied so the uninstaller can access it? I've tried a simple call already but got the Could not call proc - Exception So I'm looking for the reason for this.

Show progress details (like speed) when installing files with Inno Setup

南楼画角 提交于 2020-08-05 09:51:24
问题 I'm trying to add a dynamic progress bar in my installer. I want to install some programs with my installer. The progress bar literally should show, which program files are currently install right now. It should look like this example: I do try something like this : Inno Setup: How to manipulate progress bar on Run section? [Code] procedure UpdateProgress(Position: Integer); begin WizardForm.ProgressGauge.Position := Position * WizardForm.ProgressGauge.Max div 100; end; But I also want to see

Inno Setup: Access to custom control from OnClick event of another control

吃可爱长大的小学妹 提交于 2020-07-19 18:13:12
问题 I have next code for Inno Setup: procedure CheckBoxClick(Sender: TObject); begin { How to make BrowseButton visible from here? } end; procedure CreateTheWizardPage; var Page: TWizardPage; BrowseButton, FormButton: TNewButton; CheckBox: TNewCheckBox; Memo: TNewMemo; begin Page := PageFromID(wpReady); BrowseButton := TNewButton.Create(Page); CheckBox := TNewCheckBox.Create(Page); CheckBox.OnClick := @CheckBoxClick; end; I'm wondering how can I access custom controllers on the wizard page from

Inno Setup: Access to custom control from OnClick event of another control

霸气de小男生 提交于 2020-07-19 18:13:01
问题 I have next code for Inno Setup: procedure CheckBoxClick(Sender: TObject); begin { How to make BrowseButton visible from here? } end; procedure CreateTheWizardPage; var Page: TWizardPage; BrowseButton, FormButton: TNewButton; CheckBox: TNewCheckBox; Memo: TNewMemo; begin Page := PageFromID(wpReady); BrowseButton := TNewButton.Create(Page); CheckBox := TNewCheckBox.Create(Page); CheckBox.OnClick := @CheckBoxClick; end; I'm wondering how can I access custom controllers on the wizard page from