inno-setup

How can I create my own form or page in an Inno setup based installer?

人盡茶涼 提交于 2020-01-02 02:37:07
问题 I am new in creating installers. I need to create a form with 3 textboxes: Domain User name User password and then save them to the registry. I have already known how to save data to the registry. 回答1: Inno has a flexible dialog/page engine which allows you to create custom pages in the wizard flow. See the CodeDlg.iss example included with the Inno install for a good example of how to do this. 回答2: [Code] var lblDomain: TLabel; lblUserName: TLabel; lblPassword: TLabel; txtDomain: TEdit;

Inno Setup Modify text file and change a specific line

北慕城南 提交于 2020-01-01 20:03:02
问题 I need to open a INI file and read a specific value and check if that have different change that. But the case is my INI file doesn't have any section or key values For example, the file contains below 2 lines only. What I need is to read the second line (it should be 16001). If it is not match then change that one. Nexusdb@localhost 16000 Please suggest any ideas, it would be very helpful to me! Thank you in advance. 回答1: Your file is not an INI file. Not only it does not have sections, it

Inno Setup Modify text file and change a specific line

别说谁变了你拦得住时间么 提交于 2020-01-01 20:02:04
问题 I need to open a INI file and read a specific value and check if that have different change that. But the case is my INI file doesn't have any section or key values For example, the file contains below 2 lines only. What I need is to read the second line (it should be 16001). If it is not match then change that one. Nexusdb@localhost 16000 Please suggest any ideas, it would be very helpful to me! Thank you in advance. 回答1: Your file is not an INI file. Not only it does not have sections, it

Changing the computer name with Inno Setup

≯℡__Kan透↙ 提交于 2020-01-01 19:39:16
问题 Is there a way to change your computer name with Inno Setup? I'm new to Inno Setup but I searched quite alot and I haven't found any example of it. I know you can access the computer name with the constant {computername} , but it seems like there is no function to change it. I thought about changing the registry key of the computer name in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName with section [Registry] , but I don't know what will happen if I use

Query available RAM in Inno Setup

南楼画角 提交于 2020-01-01 19:31:16
问题 I need to get the available RAM to determinate some characteristics to my software. I have this code to show my PC's RAM: type DWORDLONG = Int64; TMemoryStatusEx = record dwLength: DWORD; dwMemoryLoad: DWORD; ullTotalPhys: DWORDLONG; ullAvailPhys: DWORDLONG; ullTotalPageFile: DWORDLONG; ullAvailPageFile: DWORDLONG; ullTotalVirtual: DWORDLONG; ullAvailVirtual: DWORDLONG; ullAvailExtendedVirtual: DWORDLONG; end; function GlobalMemoryStatusEx(var lpBuffer: TMemoryStatusEx): BOOL; external

Prevent duplicate items in list box and combo box in Inno Setup?

笑着哭i 提交于 2020-01-01 19:24:27
问题 I receive an XML file from internet (values ​from XML ​may vary, cause there are currencies). And then I load it to a list box 1. A user can add items to to list box 2 with some buttons (one by one, all, delete etc). So I want to prevent duplicates. I can't find any way to do this. My list boxes: Here is my code (for XML parsing part, see How to read multiple XML nodes? (Inno Setup)): XMLNodeList := XMLDocument.SelectNodes('//listaPaises/item'); for Index := 0 to XMLNodeList.length - 1 do

Writing 32/64-bit specific registry key in Inno Setup

北战南征 提交于 2020-01-01 11:49:35
问题 I want when I install program, the setup will create the registry in: SOFTWARE\Wow6432Node\Publisher\App with {app} main location on 64-bit systems. And I want do same for 32bit in "32 bit" location but i don't know where it is. The setup will check version of Windows and create registry depending on the system. 回答1: You want to write to: on 64-bit systems: SOFTWARE\Wow6432Node on 32-bit systems: SOFTWARE For that, you do not need to do anything special. Windows registry redirector handles

Use Define and Constant in Inno Setup

霸气de小男生 提交于 2020-01-01 10:02:18
问题 I've a question about the #define in Inno Setup. I've make a setup who's working well and i'm thinking of the future of app if i have some modification to do. For example, if i change the version (Major, Minor, Build, Patch,...) i doesn't want to change all the line (like Registry) at each time. So i try to make something like that : #define MyAppMajor "5" #define MyAppMinor "5" #define MyAppBuild "1" #define MyAppPatch "1" ... [Files] Source: "D:\ProgramFiles\..."; DestDir: "{app}\Program\

How to change file associations in Inno-setup

我的梦境 提交于 2020-01-01 09:37:09
问题 I need the user to be able to double click on a .pdb file and have it open with myPgm.exe. What is the syntax to associate a file type (myData.pdb) with an executable (myPgm.exe)? Is it a registry entry? 回答1: A File association is a series of Registry entries. For more info, take a look at How to Use File Associations Microsoft Sample. If you don't want to create system-wide file associations, you can create specific user file associations too. To create registry entries from your script,

How can my installer optionally delete some files it didn't initially create?

早过忘川 提交于 2020-01-01 07:19:07
问题 I store all my program's settings in the appdata directory %appdata%/MyProgram. When there is a problem and the user has to reinstall, I want to ask whether to delete the data in that directory. I am using Inno Setup and added a custom page to prompt the user: if DirExists(ExpandConstant('{userappdata}\MyProgram')) then begin appdataPage := CreateInputOptionPage(wpSelectTasks, 'Stored Settings', 'Would you like to remove settings before re-install?', 'Please specify if you would like to