pascalscript

Install file in Inno Setup Pascal code using FileCopy function (not to show the installation on wizard form)

我的未来我决定 提交于 2019-12-12 09:26:16
问题 How to copy a file using FileCopy function to the application folder, so that it's name does not display on the installing page? ( FilenameLabel ). I.e. I want to use the first option of Inno Setup - How to hide certain filenames while installing? (FilenameLabel) 回答1: Use the FileCopy function in the CurStepChanged event function: [Files] Source: "MyProg.exe"; Flags: dontcopy [Code] procedure CurStepChanged(CurStep: TSetupStep); begin { Install after installation, as then the application

How to select XML tag based on value of its child tag in Inno Setup

浪子不回头ぞ 提交于 2019-12-12 09:21:33
问题 I'm trying to search for a text "LIBRA ESTERLINA" in a child element of XML element and retrieve values of others child elements. But my query yields nothing. My code is based on response from How to read multiple XML nodes? (Inno Setup) and response from XPath: How to select elements based on their value? function LoadValuesFromXMLMoneda(FileName: string): Boolean; var XMLNode: Variant; XMLNodeList: Variant; XMLDocument: Variant; Index: Integer; id, moneda, dollar, abr, singPlur, caracter :

Inno Setup function not called

随声附和 提交于 2019-12-11 21:28:49
问题 I would like the [InstallDelete] section to call a custom function that will check if an older version is installed (in which case certain files need to be deleted prior installation of the new version). Extract from my Inno Setup script. First the function that returns True if an older version is installed. [Code] function deleteExistingHhd: Boolean; var Version: String; begin MsgBox('Checking for key:'+'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+ExpandConstant('AppId')+'_is1',

How can I get Pascal Script to recognize the 'create' and 'free' functions when importing a custom class?

徘徊边缘 提交于 2019-12-11 09:29:15
问题 I am having a problem with the example from this article. The article explains how to import your own classes so they can be called from a Pascal Script. I am importing my custom class but cannot get Pascal Script to recognize the 'Create' and 'Free' functions. My plugin: TMyPsPlugin = class public procedure PrintMessage(const AMessage: String); end; procedure TMyPsPlugin.PrintMessage(const AMessage: String); begin ShowMessage(AMessage); end; My app: procedure TForm1.FormCreate(Sender:

InnoSetup, Convert tasks to Radiobuttons?

痞子三分冷 提交于 2019-12-11 06:47:06
问题 I've asked something similar before in this question: InnoSetup, prevent installation if any task is selected But this situation is a little bit different because only one of both tasks should be selected, then how I could transform the selection beetwen two tasks to two new selectable Radiobuttons? PS: If that is not the best approach then please suggest me another. An image to explain: 回答1: You are missing the exclusive flag: [Tasks] Name: hidden; Description: Hidden mode; GroupDescription:

Why we cannot declare local const variables in inno-setup [Code]?

混江龙づ霸主 提交于 2019-12-10 14:53:29
问题 Do you know why when declaring local const vars , the script cannot compile? Sorry, I know very little pascal and cannot figure out why this is not working! This example (see function CircleArea ) shows that my syntax should be fine. http://www.tutorialspoint.com/pascal/pascal_quick_guide.htm This is what I am trying to do: //---placed within [Code] procedure MyLog(const _functionName, _msg: String); begin Log(_functionName + '(): ' + _msg); end; function MyExec(const _filename, _params, _dir

Inno Setup Prompt user for a folder and store the value

早过忘川 提交于 2019-12-10 11:59:06
问题 I have following need: [Run] ;run robocopy.exe source dest/OLD/[source_contents] /options Where: source must be specified by user on the destination machine (this can change according the physical platform) destination will be identical to the just user-defined source folder while the subpath OLD/[source_contents] will be automatically created by the robocopy input. I was thinking to use a "scripted-constant", but the problem is that I need to store some way the "source" prompted parameter

how to validate Edit to only numbers & only text in inno setup? [duplicate]

非 Y 不嫁゛ 提交于 2019-12-10 11:57:07
问题 This question already has answers here : Required a number in text box in Inno Setup (3 answers) Closed 2 years ago . Is there a way to limit the characters to numbers and lenght to 10 with no space and another edit for just ? its for a phone number, and name that needs to have no spaces, dont have an idea how to do it. Found a code that try some ways to implement but dont work here is what I found for dont allow letters. procedure TForm1.Edit1KeyPress(Sender: TObject; var Key: Char); begin

Downloading file with Inno Setup only when user chooses to

♀尐吖头ヾ 提交于 2019-12-10 11:42:45
问题 Question: I’d like to know how to script to download a second file which is a zip but initially give a choice between two zip files; download, unzip and delete the zip. The zip files each have different names but the contents have a different name to the zips (each the same name); no renaming required. This question is a little similar to Apply Download file condition in inno-setup The files in question are downloaded via the SourceForge website. The programs (clones) these files are intended

Port range validation for data input in Inno Setup

余生长醉 提交于 2019-12-10 11:37:29
问题 I try to set specific range of values that accepted from user inputs within installation. For example, port field just accept range from 10000-20000. I try to use this condition in NextButtonClick or even other. I searched in Pascal documentation, but I didn't find how to do that, else there is no question asked before here to set data validation for specific range. My code as below: [Code] var AdminDataPage: TInputQueryWizardPage; Name, SuperPassword, ServerName, ServerPort : String;