File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ public abstract class DriverService : IDisposable
38
38
private string driverServiceExecutableName ;
39
39
private int driverServicePort ;
40
40
private bool silent ;
41
+ private bool hideCommandPromptWindow ;
41
42
private Process driverServiceProcess ;
42
43
43
44
/// <summary>
@@ -108,6 +109,15 @@ public bool IsRunning
108
109
get { return this . driverServiceProcess != null && ! this . driverServiceProcess . HasExited ; }
109
110
}
110
111
112
+ /// <summary>
113
+ /// Gets or sets a value indicating whether the command prompt window of the service should be hidden.
114
+ /// </summary>
115
+ public bool HideCommandPromptWindow
116
+ {
117
+ get { return this . hideCommandPromptWindow ; }
118
+ set { this . hideCommandPromptWindow = value ; }
119
+ }
120
+
111
121
/// <summary>
112
122
/// Gets the executable file name of the driver service.
113
123
/// </summary>
@@ -143,6 +153,7 @@ public void Start()
143
153
this . driverServiceProcess . StartInfo . FileName = Path . Combine ( this . driverServicePath , this . driverServiceExecutableName ) ;
144
154
this . driverServiceProcess . StartInfo . Arguments = this . CommandLineArguments ;
145
155
this . driverServiceProcess . StartInfo . UseShellExecute = false ;
156
+ this . driverServiceProcess . StartInfo . CreateNoWindow = this . hideCommandPromptWindow ;
146
157
this . driverServiceProcess . Start ( ) ;
147
158
Uri serviceHealthUri = new Uri ( this . ServiceUrl , new Uri ( "status" , UriKind . Relative ) ) ;
148
159
bool processStarted = false ;
You can’t perform that action at this time.
0 commit comments