pascalscript

How to change background color of SelectDirBitmapImage and SelectGroupBitmapImage in Inno Setup

╄→尐↘猪︶ㄣ 提交于 2020-06-13 05:52:07
问题 How to change background color of SelectDirBitmapImage and SelectGroupBitmapImage in Inno Setup? 回答1: Hardly. Both those are icons with a transparent background from shell32.dll painted on the TBitmapImage using SelectDirPage.Color and SelectProgramGroupPage.Color long before any use code is triggered. It cannot be updated. You would have to repeat all the painting code in your Pascal Script. It's probably doable, but lot of work. The relevant code is in LoadSelectDirAndGroupImages function:

Evaluate a collection of data from preprocessor on run time in Inno Setup Pascal Script

断了今生、忘了曾经 提交于 2020-05-28 06:42:29
问题 I am trying to get Inno Setup define value in Code section but not with {#VersionTool1} . I need to pass defined name dynamically, because there are a lot of them (I want to avoid large switch case). I tried SetupSetting but it's not in Setup section (it's before it). Is there any way to do this? #define VersionTool1 2019.01.1111 #define VersionTool2 2020.02.2111 ... [Code] procedure SetSelectedTool(ToolName: String); var CurrentTool: string; begin ... CurrentTool := 'Version' + ToolName;

Evaluate a collection of data from preprocessor on run time in Inno Setup Pascal Script

眉间皱痕 提交于 2020-05-28 06:41:53
问题 I am trying to get Inno Setup define value in Code section but not with {#VersionTool1} . I need to pass defined name dynamically, because there are a lot of them (I want to avoid large switch case). I tried SetupSetting but it's not in Setup section (it's before it). Is there any way to do this? #define VersionTool1 2019.01.1111 #define VersionTool2 2020.02.2111 ... [Code] procedure SetSelectedTool(ToolName: String); var CurrentTool: string; begin ... CurrentTool := 'Version' + ToolName;

Running script code (adding a registry key) instead of executable in Run entry in Inno Setup

China☆狼群 提交于 2020-05-28 04:39:33
问题 I want to add a registry key after the user accept the key addition. The key will tell Firefox where to find our plugin (which is stored in the app folder) The user will get a checkbox "install ff plug-in?" in the same form as where we ask "install chrome plugin" and "install ie plugin?" . [Code] function GetHKLM: Integer; begin if IsWin64 then Result := HKLM64 else Result := HKLM32; end; function CheckForMozilla: Boolean; begin Result := False; if RegKeyExists(GetHKLM(), 'SOFTWARE\Mozilla

How can I copy the installer to the temp file and then run it?

你。 提交于 2020-05-12 09:02:08
问题 I am trying to copy the installer to the temp folder and then run it from that location. This is what I am trying to do, but so far to no avail. FileCopy(ExpandConstant('{srcexe}'), ExpandConstant('{tmp}\Setup.exe'), True); Exec(ExpandConstant('{tmp}\Setup.exe'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) How can I copy the installer to the temp file and then run it from the code section? 回答1: No idea why, but there's an explicit check that prevents FileCopy function from copying the

How to skip custom page based on setup type in Inno Setup

旧巷老猫 提交于 2020-04-10 06:20:54
问题 I'm building my setup with server and client installation/setup types. I need to skip or hide a custom page if user choose server type. Server type only have a custom page to select SQL instance and a button to launch sqlcmd to install DB, while client installation only copy some files to program directory. This is my test code with custom page: [Types] Name: "Server"; Description: "Server" Name: "Client"; Description: "Client" [Components] Name: "Dictation"; Description: "Dictation"; Types:

Inno Setup: Close installer wizard if file exists in the program's folder

左心房为你撑大大i 提交于 2020-03-15 07:35:59
问题 I am trying to create an installer that is a Demo installer that if it detects the file close.txt in the programs folder then it closes the wizard or aborts install. I am running a scheduled task that automatically uninstalls the app after two days. On initial install the close.txt file gets installed in the programs folder then after auto uninstall the close.txt file is left in the programs folder. I would like for when you re run the installer it checks for this file and if it is found to

Inno Setup event that is generated when folder is browsed on TInputDirWizardPage?

ぐ巨炮叔叔 提交于 2020-01-14 04:09:31
问题 I'm using a custom TInputDirWizardPage to input three different target folders for my installation. When the first folder is changed, I'd like to automatically change the 3rd folder's path. Is it possible to create an event that occurs when the Browse button is used for the first folder and a specific folder is selected? If so, is it also possible to change the 3rd folder's path programmatically? 回答1: You can override TInputDirWizardPage.Buttons[0].OnClick event handler: var DirPage:

How to reduce the line spacing between two input boxes on Inno Setup TInputQueryWizardPage (CreateInputQueryPage)

蹲街弑〆低调 提交于 2020-01-13 20:25:15
问题 I have a TInputQueryWizardPage page with 8 user inputs. The wizard page has been increased but still all the values are not visible. Is there a way to reduce the line spacing between two values so that all the values will be displayed with the current wizard size? 回答1: Use TInputQueryWizardPage.Edits and TInputQueryWizardPage.PromptLabels to access the controls and re-locate them as you need: [Code] procedure ReducePromptSpacing(Page: TInputQueryWizardPage; Count: Integer; Delta: Integer);

How to execute a batch file on uninstall in Inno Setup?

隐身守侯 提交于 2020-01-11 06:31:04
问题 I'm using code from How do you execute command line tools without using batch file in Inno Setup response to execute all my batch files on installation (before, after). No I want to execute them just when user click "YES" to uninstaller , but can't find a way to do it. It executes before the confirmation Here is my code from [Code] section: function InitializeUninstall(): Boolean; var ResultCode : Integer; begin Result := True; Exec(ExpandConstant('{app}\scripts\unset.bat'), '', '', SW_HIDE,