pascalscript

Play a sound only in a specific page in Inno Setup

人走茶凉 提交于 2021-01-21 05:34:06
问题 I'm creating a installer for my application with Inno Setup. I use BASS audio library to play music in background of the installer. Here is my code for playing the sound. [Code] const DI_NORMAL = 3; FR_PRIVATE = $10; {added to compact Mode} BASS_SAMPLE_LOOP = 4; BASS_ACTIVE_STOPPED = 0; BASS_ACTIVE_PLAYING = 1; BASS_ACTIVE_STALLED = 2; BASS_ACTIVE_PAUSED = 3; BASS_UNICODE = $80000000; BASS_CONFIG_GVOL_STREAM = {#MusicVolume}; EncodingFlag = BASS_UNICODE; #if CheckCRC == "1" PM_REMOVE = 1; WM

Query list of Windows accounts in Inno Setup

久未见 提交于 2021-01-01 06:43:52
问题 In my Inno Setup project I need to allow the user to choose an account from the list of all local accounts on a custom page. The selected account will be used to install a service with custom credential. How can I make this? Thank you in advance! 回答1: You can use WMI Win32_UserAccount class to query the list of accounts. [Run] Filename: sc.exe; Parameters: ... {code:GetAccount} [Code] var AccountPage: TInputOptionWizardPage; procedure InitializeWizard(); var WMIService: Variant; WbemLocator:

Inno Setup: How to show (hide/unhide) password on checkbox checked

一曲冷凌霜 提交于 2021-01-01 04:58:51
问题 I am adding a checkbox to my input query page to use it to show me the password uncovered, when is checked. But I don't know how to do that. I already created the following procedure. But this procedure does not change me the true false value on add input. This procedure adds me new textbox that do the job. Could you please help me? procedure SPCheckBoxChecked(Sender: TObject); begin if Assigned(SPCheckBox) then begin if SPCheckBox.Checked then CredentialsPage.Add('Password:', False) if not

Inno Setup: How to show (hide/unhide) password on checkbox checked

时光毁灭记忆、已成空白 提交于 2021-01-01 04:58:43
问题 I am adding a checkbox to my input query page to use it to show me the password uncovered, when is checked. But I don't know how to do that. I already created the following procedure. But this procedure does not change me the true false value on add input. This procedure adds me new textbox that do the job. Could you please help me? procedure SPCheckBoxChecked(Sender: TObject); begin if Assigned(SPCheckBox) then begin if SPCheckBox.Checked then CredentialsPage.Add('Password:', False) if not

Execute a batch file after installation and display its output on a custom page before Finished page in Inno Setup

只愿长相守 提交于 2021-01-01 04:53:34
问题 A cmd output can be shown within Inno Setup UI using this solution: Embedded CMD in Inno Setup installer (show command output on a custom page) My problem is that I want to execute a batch file in [Run] section (i.e.) after installation. Also, I want its output to be displayed in Inno Setup UI, but from documentation I see that [Run] will be executed after installation and before final dialog is displayed. So how can I show a custom page after installation, which will display all the output

Write serial number to file using Inno Setup

泄露秘密 提交于 2020-12-31 10:42:59
问题 I am trying to get the following Inno Setup code to work: [Setup] UserInfoPage=yes [Code] function CheckSerial(Serial: String): Boolean; begin Result := true; SaveStringToFile('c:\Registration.txt', Serial, False); end; The code is extremely simple when the file path is known at UserInfoPage . However it becomes extraordinarily complex when I need to write this file next to my application. Neither: WizardDirValue(); nor ExpandConstant('{app}'); do work. The first one is empty when called too

Loading DLL with dependencies in Inno Setup fails in uninstaller with “Cannot import DLL”, but works in the installer

浪子不回头ぞ 提交于 2020-12-30 03:39:06
问题 When I uninstall the program I get this error: Cannot import dll: <utf8>c:\TestProg\IsStart.dll What have I done wrong here? Can anybody help me to solve this problem? CheckO4TaskMngrSvcStopAndUninstall stops and deletes the O4TaskManager Service : Here's the code: [Files] Source: "IsStartServer.dll"; DestDir: "{tmp}"; DestName: IsStart.dll Source: "IsStartServer.dll"; DestDir: "{app}"; DestName: IsStart.dll Source: "sqlite3x86.dll"; DestDir: "{src}"; DestName: sqlite3.dll Source: "sqlite3x86

Inno Setup: How can I edit and retrieve value from a children section of a JSON file

别说谁变了你拦得住时间么 提交于 2020-12-26 04:03:59
问题 I'm working to create an installer and I need to edit and retrieve values from the JSON file. To retrieve and edit the values from the Section_2 works fine. The problem is to edit and retrieve values from the children sections of Section_1 . Bellow we can see an example: { "Section_1": { "children_1": { "children_1_1": "value_1", "children_1_2": "value_2" }, "children_2": "blablabla" }, "Section_2": { "children_2_1": "value_1", "children_2_2": "value_2" } } [Files] Source: "{#ProjectUrl}

Inno Setup - Language selector with VCL Styles

这一生的挚爱 提交于 2020-12-07 08:20:53
问题 Is there any way to use language selector (Inno Setup) with VCL Styles? How? 回答1: The "Select Setup Language" dialog displays before the InitializeSetup event function is called. So you cannot load the skin for the dialog. As a workaround, you can implement your own "language" dialog, and display that from the InitializeSetup . This way the custom dialog will be skinned. Once a user selects a language, you restart the installer with the /LANG switch to load the selected language. Make sure

Inno Setup - Language selector with VCL Styles

随声附和 提交于 2020-12-07 08:20:12
问题 Is there any way to use language selector (Inno Setup) with VCL Styles? How? 回答1: The "Select Setup Language" dialog displays before the InitializeSetup event function is called. So you cannot load the skin for the dialog. As a workaround, you can implement your own "language" dialog, and display that from the InitializeSetup . This way the custom dialog will be skinned. Once a user selects a language, you restart the installer with the /LANG switch to load the selected language. Make sure