Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: C# 以编程方式启动 Windows 服务
我想从 wpf 应用程序内部启动/停止预先存在的 Windows 服务。关于如何做到这一点的任何指示?
您正在寻找ServiceController类,更具体地说是Start / Stop方法。
Process.Start("net start myService");