✅ Does the value of CreateNoWindow matter when UseShellExectute=true?

ProcessStartInfo info = new()
{
FileName = @"cmd",
Arguments = @"actions.bat",
CreateNoWindow = true, // either true or false it still creates a window
UseShellExecute = true
};
using var process = new Process { StartInfo = info };
process.Start();
ProcessStartInfo info = new()
{
FileName = @"cmd",
Arguments = @"actions.bat",
CreateNoWindow = true, // either true or false it still creates a window
UseShellExecute = true
};
using var process = new Process { StartInfo = info };
process.Start();
1 Reply
leowest
leowest10mo ago
Remarks If the UseShellExecute property is true or the UserName and Password properties are not null, the CreateNoWindow property value is ignored and a new window is created.
https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.processstartinfo.createnowindow?view=net-8.0
Want results from more Discord servers?
Add your server