inno-setup

Inno Setup - How to show percent done, elapsed time and estimated time progress at uninstaller?

跟風遠走 提交于 2021-02-07 10:54:55
问题 I am trying to use this code: How to show percent done, elapsed time and estimated time progress? But I have problems, because i use this code to the installer too. 回答1: Merging these two piece of code together: Inno Setup uninstall progress bar change event How to show percent done, elapsed time and estimated time progress? [Code] function SetTimer(hWnd: longword; nIDEvent, uElapse: LongWord; lpTimerFunc: LongWord): LongWord; external 'SetTimer@user32.dll stdcall'; function GetTickCount:

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

Inno Setup - How to change the icon of the shortcut of uninstaller without separate icon file?

这一生的挚爱 提交于 2021-02-07 10:30:13
问题 Is it possible to change the icon of the uninstaller shortcut in the Start menu without storing a separate icon file (to the app folder)? I see this: Using Resource Hacker for changing the icon after the build, but I cannot implement it. My code: [Icons] Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} 回答1: An icon of a Windows shell shortcut can be set by an external icon file (what you do not want) or by the file the shortcut points to. So you have to modify the

Inno Setup - How to change the icon of the shortcut of uninstaller without separate icon file?

℡╲_俬逩灬. 提交于 2021-02-07 10:29:59
问题 Is it possible to change the icon of the uninstaller shortcut in the Start menu without storing a separate icon file (to the app folder)? I see this: Using Resource Hacker for changing the icon after the build, but I cannot implement it. My code: [Icons] Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe} 回答1: An icon of a Windows shell shortcut can be set by an external icon file (what you do not want) or by the file the shortcut points to. So you have to modify the

How to add access key to button in Inno Setup

强颜欢笑 提交于 2021-02-07 10:29:16
问题 I want to add Alt functions to my audio button; Alt+M for Mute and Alt+P for Play Like this How? What code should be entered? Where will I insert the code? Here's my script: SoundCtrlButton := TNewButton.Create(WizardForm); SoundCtrlButton.Parent := WizardForm; SoundCtrlButton.Left := 8; SoundCtrlButton.Top := WizardForm.ClientHeight - SoundCtrlButton.Height - 8; SoundCtrlButton.Width := 40; SoundCtrlButton.Caption := ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}'); SoundCtrlButton

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 (

How to add access key to button in Inno Setup

会有一股神秘感。 提交于 2021-02-07 10:27:10
问题 I want to add Alt functions to my audio button; Alt+M for Mute and Alt+P for Play Like this How? What code should be entered? Where will I insert the code? Here's my script: SoundCtrlButton := TNewButton.Create(WizardForm); SoundCtrlButton.Parent := WizardForm; SoundCtrlButton.Left := 8; SoundCtrlButton.Top := WizardForm.ClientHeight - SoundCtrlButton.Height - 8; SoundCtrlButton.Width := 40; SoundCtrlButton.Caption := ExpandConstant('{cm:SoundCtrlButtonCaptionSoundOff}'); SoundCtrlButton

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

不问归期 提交于 2021-02-07 10:27:03
问题 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 (