pascalscript

Avoid restart prompt in Inno Setup

 ̄綄美尐妖づ 提交于 2021-02-08 10:20:17
问题 I am using restartreplace flag to replace the locked file, so it will prompt a message at the end of the installation to restart the machine. But I don't want to display it, and it should be set to restart later by default. Is there any way? 回答1: You can hide Yes/No restart radio buttons. And update the screen text accordingly. procedure CurPageChanged(CurPageID: Integer); var S: string; begin if CurPageID = wpFinished then begin WizardForm.YesRadio.Visible := False; WizardForm.NoRadio

Avoid restart prompt in Inno Setup

怎甘沉沦 提交于 2021-02-08 10:19:00
问题 I am using restartreplace flag to replace the locked file, so it will prompt a message at the end of the installation to restart the machine. But I don't want to display it, and it should be set to restart later by default. Is there any way? 回答1: You can hide Yes/No restart radio buttons. And update the screen text accordingly. procedure CurPageChanged(CurPageID: Integer); var S: string; begin if CurPageID = wpFinished then begin WizardForm.YesRadio.Visible := False; WizardForm.NoRadio

Inno Setup - Multiple software versions in one installation

て烟熏妆下的殇ゞ 提交于 2021-02-08 09:51:27
问题 I need to make a setup with multiple versions of software and i want to make it have the option for portable / install. I have a customized components page. It should show after info page and then the directory selection page should show once the options are selected. I THINK I have the [Files] and [Tasks] and [Components] sections figured out. It's mainly the code section I am struggling with. For example if the user selects to install the Pro version by using the radio button, once Next is

DwinsHs for Inno Setup: How to add an apikey HTTP header of a request?

試著忘記壹切 提交于 2021-02-08 06:52:24
问题 I'm using a third party tool by the name of DwinsHs for Inno Setup. This third party tool provides me the capability for downloading files as part of the installation. I want to send an HTTPS request to remote server and I would like to pass an apikey to the header of the request but it returns error 401. This is the code: [ISPP] #define fileURL "https://myserver.xom?apikey=XXXX-XXXX-XXXX-XXXX" [Code] Source: "<path_to_my_file>"; \ DestDir: "{app}"; \ Flags: external deleteafterinstall; \

DwinsHs for Inno Setup: How to add an apikey HTTP header of a request?

こ雲淡風輕ζ 提交于 2021-02-08 06:51:15
问题 I'm using a third party tool by the name of DwinsHs for Inno Setup. This third party tool provides me the capability for downloading files as part of the installation. I want to send an HTTPS request to remote server and I would like to pass an apikey to the header of the request but it returns error 401. This is the code: [ISPP] #define fileURL "https://myserver.xom?apikey=XXXX-XXXX-XXXX-XXXX" [Code] Source: "<path_to_my_file>"; \ DestDir: "{app}"; \ Flags: external deleteafterinstall; \

DwinsHs for Inno Setup: How to add an apikey HTTP header of a request?

谁说我不能喝 提交于 2021-02-08 06:49:05
问题 I'm using a third party tool by the name of DwinsHs for Inno Setup. This third party tool provides me the capability for downloading files as part of the installation. I want to send an HTTPS request to remote server and I would like to pass an apikey to the header of the request but it returns error 401. This is the code: [ISPP] #define fileURL "https://myserver.xom?apikey=XXXX-XXXX-XXXX-XXXX" [Code] Source: "<path_to_my_file>"; \ DestDir: "{app}"; \ Flags: external deleteafterinstall; \

Why do we use '&' character in Inno Setup?

让人想犯罪 __ 提交于 2021-02-07 10:47:13
问题 Here's a page from documentation: CreateInputQueryPage. Why do we use & character in the following part? Page.Add('&Name:', False); Page.Add('&Company:', False); I tried omitting it but nothing changed. 回答1: It determines, what letter serves as an access key for the control (for controls that have labels on their own, like checkboxes, radio buttons or buttons) or for the control associated with a label using the TLabel.FocusControl property (for controls without their own labels, like edit

Inno Setup to create a user in Windows

邮差的信 提交于 2021-02-07 10:44:09
问题 I´m start user in inno Setup, but I need to create an user in Windows with a password that need input during installation. Like in CheckSerial where is needed input a name, I need someway to cap this name and other field to insert a password. On DOS I can create a user with: net user USER PWD /add /fullname:"USER" /comment:"TEST" /expires:never /passwordchg:no I got it in [Run] Filename: net.exe; parameters: "user USER PWD /add /fullname:""USER"" /comment:""TEST"" /expires:never /passwordchg

Debugging Inno Setup installer that respawns itself

允我心安 提交于 2021-02-07 10:33:16
问题 As it can be seen from this question we start a new instance of Inno Setup: Instance := ShellExecute(0, '', ExpandConstant('{srcexe}'), Params, '', SW_SHOW); where function ShellExecute(hwnd: HWND; lpOperation: string; lpFile: string; lpParameters: string; lpDirectory: string; nShowCmd: Integer): THandle; external 'ShellExecuteW@shell32.dll stdcall'; All the code from this question's answer I moved to the VCL_Styles.iss file and included it into my main script. The problem is that after I've

How to save a UTF-16 with BOM file with Inno Setup

天大地大妈咪最大 提交于 2021-02-07 10:28:58
问题 How to save a string to a text file with UTF-16 (UCS-2) encoding with BOM? The SaveStringsToUTF8File saves as UTF-8. Using streams saves it as ANSI. var i:integer; begin for i := 1 to length(aString) do begin Stream.write(aString[i],1); Stream.write(#0,1); end; stream.free; end; 回答1: As the Unicode string (in the Unicode version of Inno Setup – the only version as of Inno Setup 6) actually uses the UTF-16 LE encoding, all you need to do is to copy the (Unicode) string to a byte array (