你真的需要加强你的沟通。问题措辞非常糟糕。有 2 个选项,通过进程或 Windows 启动中的命令行
ProcessStartInfo psi = new ProcessStartInfo(realCMD.ToString(),realARGS.ToString());
if (domainName != null)
psi.Domain = domainName;
psi.UserName = realUsername;
psi.Password = securePassword;
psi.CreateNoWindow = true;
psi.UseShellExecute = false;
如果我们这样做,执行时总是会显示一个窗口。
在 Windows 中从命令行启动程序的命令是“start”
启动一个单独的窗口以运行指定的程序或命令。
START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/AFFINITY <hex affinity>] [/WAIT] [/B] [command/program]
[parameters]
"title" Title to display in window title bar.
path Starting directory
B Start application without creating a new window. The
application has ^C handling ignored. Unless the application
enables ^C processing, ^Break is the only way to interrupt
the application
I The new environment will be the original environment passed
to the cmd.exe and not the current environment.
MIN Start window minimized
MAX Start window maximized
SEPARATE Start 16-bit Windows program in separate memory space
SHARED Start 16-bit Windows program in shared memory space
LOW Start application in the IDLE priority class
NORMAL Start application in the NORMAL priority class
HIGH Start application in the HIGH priority class
REALTIME Start application in the REALTIME priority class
ABOVENORMAL Start application in the ABOVENORMAL priority class
BELOWNORMAL Start application in the BELOWNORMAL priority class
AFFINITY The new application will have the specified processor
affinity mask, expressed as a hexadecimal number.
WAIT Start application and wait for it to terminate
您可能希望使用 MIN 选项来启动最小化的程序