-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set ManagedAction execute before Appsearch #337
Comments
If you are using ManagedUI you can use two methods that are executed before the UI is displayed: project.UIInitialized += ...
project.UILoaded += ... Have a look at CustomUISequence, which shows how to check the product compatibility and prompt the user. |
Thanks Oleg. I tried it and works good. Only one question. if i set Result to Failure exit dialog not apears with my message, that components are not installed or not found. how can i set this ? |
You will need to set This is how it's done in "MajorUpgrade" sample: project.UIInitialized += (SetupEventArgs e) =>
{
Version installedVersion = e.Session.LookupInstalledVersion();
Version thisVersion = e.Session.QueryProductVersion();
if (thisVersion <= installedVersion)
{
MessageBox.Show("Later version of the product is already installed : " + installedVersion);
e.ManagedUI.Shell.ErrorDetected = true;
e.Result = ActionResult.UserExit;
}
}; |
Thanks. Works really great. How can i set my message in exitdialog in descrptionpart? I get always standard error. System was not modified .... on ExitDialog. |
The UX of the ManagetUI dialogs mimics stock UI that comes with MSI/WiX. And that UX does not allow runtime customization of the exit dialog. I always shows the the standard "outcome description" and the specific error is displayed earlier when the error is detected. Thus, currently, you cannot do it directly. The only option you have is to have a custom UI sequence and customize your ExitDialog and show the description either from custom global storage (type static property, MSI property, environment variable) that is initialized in the Saying that kind of see here an opportunity to improve the dev experience. e.ManagedUI.Shell.CustomErrorDescription = "Setup was aborted, because system " +
"does not meet deployment requirements."; |
- Added `SetupEventArgs.ManagedUI.Shell.CustomErrorDescription`
----- v1.6.4.0 * Implemented localization of the Feature's description text (ManagedUI) * AutoEllipsis enabled for long Feature's label text * Issue #337: How to set ManagedAction execute before Appsearch Added `SetupEventArgs.ManagedUI.Shell.CustomErrorDescription` * Add dual signing of binaries. * Issue #333: FeaturesDialog drawing issues * Added sample for "Issuae #324: Capture Msi error in bootraper" * Added support for bootstrapper generic items (`Bundle.Items`): Triggered by #315 * Issue #270: Deduplication of files added with wildcards sample dedup * Added additional resolution algorithm for FileShortcut location, which now can be both dir id and dir path. Triggered by #307 * Issue #307: Fileshortcuts starting with an integer; Removed '_' inserted by the 'start digit in the name' check for composite Dir Ids (e.g. ProgramMenuFolder.1My_Product); * Issue #180: Multiple root level directories. Added `InstallDir` class * Added `FileShortcut` constructor that does nor require 'location' parameter. It automatically creates the shortcut in the parent `Dir`. Triggered by #307. * Package WixSharp.bin: added copying nbsbuilder.exe to output folder * NuGet package(s): Added <references> section to register only managed dlls. WixSharp.bin.targets file is added to copy unmanaged dll to the output folder. * Implementation XmlFile Element * Issue #304: Localization bootstrapper via theme file * Added optional generation of the XML id attribute for `Bootstrapper.Payload.Id` * Issue #303: ExternalTool method ConsoleRun(Action<string> onConsoleOut) pass invalid unicode strings to onConsoleOut * Added `ExternalTool,Encoding`. The default value is `Encoding.UTF8`.
Thanks. I will wait for new Release 1.6.4.0. |
All done. You can update you NuGet packages now |
Hallo Oleg, i just tested new e.ManagedUI.Shell.CustomErrorDescription with my Description "Setup was aborted, because system does not meet deployment requirements."; Works great. Thanks. |
Great. Closing the issue. |
Hi Oleg, is there some posibility to set ManagedAction before Appsearch ?
I have to check if Windows OS is Server and then check if I can install my Application on it. I create ManagedAction and add MA to prject
.. new ManagedAction(CustomAction.CheckOS, Return.check, When.Before, Step.Appsearch, Condition.NOT_Installed)
, then during install MA will be executed and return false. After that i got Wizard Message . "... System was not modified." This works fine. How do i execute MA before show WelcomeDialog and show some Message like "OS not Windows Server Installer cant be executed on this OS " something like that ?The text was updated successfully, but these errors were encountered: