inno setup % percentage progress bar [closed] - inno-setup

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Anyone know how to put a percentage% of the progress bar down the bar
ex: edited image in photoshop inno setup 5.5.1-unicode+Script ISDone 0.6 thanks

If you want to put the percentage label on the Installing wizard page, then I think it is not possible. But you could use the CreateOutputProgressPage which let you control the progressbar and you can add a percentage label via Pascal Script.
[Code]
procedure InitializeWizard();
var
Page: TOutputProgressWizardPage;
PercentLabel: TLabel;
begin
Page := CreateOutputProgressPage('Caption', 'Description');
Page.ProgressBar.Show;
PercentLabel := TLabel.Create(Page);
PercentLabel.Top := Page.ProgressBar.Top + 20;
PercentLabel.Caption := '0%';
...
end;
Also read this question: Inno Setup Simple progress page for Run section. It demonstrates how to control the progress.

Related

Inno Setup - How to add picture box to progress dialog? [duplicate]

This question already has answers here:
Inno Setup built-in control names
(1 answer)
Inno Setup - Customize installing page
(1 answer)
Closed 9 months ago.
This code adds a picture to the licnese agreement wizard page,
picLicense := TBitmapImage.Create(WizardForm.LicensePage);
with picLicense do
begin
Parent := WizardForm.LicensePage;
Left := ScaleX(0);
Top := ScaleY(0);
Width := ScaleX(100);
Height := ScaleY(100);
Stretch := True;
Bitmap.LoadFromFile(ExpandConstant('{tmp}\image.bmp'));
end;
But how to add the image or any other custom control to progress dialog wizard page?

Inno Setup Disable Next Button if user does not replace 'Enter' with anything else [duplicate]

This question already has answers here:
Inno Setup Disable Next button when input is not valid
(1 answer)
How to disable NextButton when file is not selected on InputFilePage (CreateInputFilePage)?
(1 answer)
Closed 4 years ago.
How do I prevent user from moving on if 'Enter' is not overwritten with anything else. Instead of 'Enter', I can also just make it blank. Regardless, the user must put something in there in order to enable the Next button. This is the second window after the welcome page that I need to do this with.
[Code]
var
SettingEnv: TInputQueryWizardPage;
procedure InitializeWizard;
begin
SettingEnv := CreateInputQueryPage(wpWelcome,
'User Input', '', 'Enter SettingEnv, then click Next.');
SettingEnv.Add('', False);
SettingEnv.Values[0] := 'Enter';
end;
I suggest you use:
function NextButtonClick(CurPageID: Integer): Boolean;
From the documentation:
Called when the user clicks the Next button. If you return True,
the wizard will move to the next page; if you return False, it will
remain on the current page (specified by CurPageID).
Note that this function is called on silent installs as well, even
though there is no Next button that the user can click. Setup instead
simulates "clicks" on the Next button. On a silent install, if your
NextButtonClick function returns False prior to installation starting,
Setup will exit automatically.
There is a related answer to a similar question which has code. This will help.

Inno Setup: How to set orger wizard pages? [duplicate]

This question already has answers here:
How to add two custom pages in Inno Setup?
(2 answers)
Closed 5 years ago.
I have three wizard pages in my setup, and they have wrong order.
They open:
page 1.
page 2.
pagr 3.
I want order open: page 2 -> page 3 -> page 1.
I found article link and it talk about function CreateInputDirPage(const AfterID: Integer; const ACaption, ADescription, ASubCaption: String; AAppendDir: Boolean; ANewFolderName: String): TInputDirWizardPage;. I think that const AfterID changes order, but i don't know how.
Thank you for any idea.
If you look in the Innosetup documentation of BackButtonClick(), NextButtonClick(), you will see these functions uses a PageID for identification of current wizard page. Some IDs are wpWelcome, wpSelectComponents,...
So if you call FirstPage := CreateInputDirPage(...) for the first page AfterID may be something like wpSelectComponents. The return value is of type TInputDirWizardPage based on TWizardPage containing an ID. Maybe this ID is the wanted ID for the next CreateInputDirPage(...) call.

Inno Setup Show MessageBox when Cancel button is clicked [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How to make a message box on the Cancel button?
https://4sysops.com/wp-content/uploads/2015/09/Yes-No-prompt.png
Implement the CancelButtonClick event function.
[Code]
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
MsgBox('Cancel button was clicked', mbInformation, MB_OK);
end;
Set the Cancel and Confirm out parameters to make Inno Setup proceed as you need.

Set a default caption for ALL messagebox? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
In c# 4.0 I would like to set, at an application level, a default caption for any message boxes the program creates. And by caption I mean the title of the message box.
So should a error message be displayed to the user they will all have the same title.
I know I can do it by using this Message Box overload:
MessageBox.Show(errorMessage, caption);
But I am wondering if there is a more crisp, clean, way to do it?
Rather than having to add a parameter to lots of calls?
You can't really set a default. But you can make a helper to set the title for you, if you really want
public static class MessageBoxEx
{
public static void Show(string message)
{
MessageBox.Show(message, "My Application Name");
}
}
You can of course set the caption however you want, such as from a resource file for multiple languages and locales.

Resources