如何启动/停止在C# 使用net stop命令服务,例如如何启动/停止使用net stop命令服务
Dim pstart As New ProcessStartInfo
Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.System)
Dim p As New Process
pstart.FileName = path + "\cmd.exe"
pstart.UseShellExecute = False
pstart.CreateNoWindow = True
pstart.WorkingDirectory = path
pstart.FileName = "cmd.exe"
pstart.Arguments = " net start mysql"
p.StartInfo = pstart
p.Start()
我已经使用进程类,但没有任何结果
我完全写到这,太,也没有表现出“新答案”的东西我张贴之前。做得好! – 2009-07-11 05:17:26
感谢您的快速响应 – 2009-07-11 05:22:05