如何啓動/停止在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