ProcessStartPolicy.RestrictedProcessStartConfirmationEventArgs Class
Contains data for the ConfirmationRequest event.
Namespace: DevExpress.Data.Utils
Assembly: DevExpress.Data.Desktop.v25.2.dll
NuGet Packages: DevExpress.Data.Desktop, DevExpress.ExpressApp.Win.Design
Declaration
Remarks
The RestrictedProcessStartConfirmationEventArgs class supplies detailed information about a process that is about to be started and is considered potentially unsafe under the active ProcessStartPolicy.
You can inspect the target executable, its command-line arguments, or the associated URI (if applicable), and explicitly allow or block execution by calling the AllowStart() or BlockStart() method.
The following example enables the RequireConfirmation() policy at application startup and handles the ConfirmationRequest event to implement custom validation logic. The event handler allows only HTTPS URLs and blocks all other process start requests without displaying the confirmation dialog.
using DevExpress.Data.Utils;
internal static class Program {
[STAThread]
static void Main() {
// Apply the RequireConfirmation policy.
ProcessStartPolicy.RequireConfirmation();
ProcessStartPolicy.ConfirmationRequest += ProcessStartPolicy_ConfirmationRequest;
ApplicationConfiguration.Initialize();
Application.Run(new Form1());
}
// Allow only HTTPS URLs.
static void ProcessStartPolicy_ConfirmationRequest(object? sender, ProcessStartPolicy.RestrictedProcessStartConfirmationEventArgs e) {
if (e.Uri != null)
if (e.Uri.Scheme == Uri.UriSchemeHttps)
e.AllowStart(); // Safe URL — allow execution
else
e.BlockStart(); // Non-HTTPS — block execution
}
}