You can use an asynchronous approach to
Process.Start
(
the default one is synchronous and doesn't wait for the process to start, it returns before that) and show a progress bar until the
Task
object completes.
See this thread for that,
c# - Is there any async equivalent of Process.Start? - Stack Overflow[
^].
Quote:
Need Progress Bar While Process Loading
This depends on the framework that you are using. Are you using WPF, WinForms, or any other front-end framework to render the controls. You will need to show the progress bar for that specific framework.
ProgressBar Class (System.Windows.Controls) | Microsoft Docs[
^]
ProgressBar Control (Windows Forms) | Microsoft Docs[
^]
The rest of the step is just the async/await application before the
Process.Start
and calling the function with await applied. Once the await is done, you can hide the
ProgressBar
and continue with the process that just started.