Execute Command Prompt

Shutdown Computer


Case 1.
system.Diagnostics.Process.Start("shutdown","-s -t -m \\10.10.40.54")


Case 2.
Dim si As New System.Diagnostics.Process
si.StartInfo.WorkingDirectory = "c:\\"
si.StartInfo.UseShellExecute = False
si.StartInfo.FileName = "cmd.exe"
si.StartInfo.Arguments = "/c shutdown -s -m \\"
si.StartInfo.CreateNoWindow = True
si.StartInfo.RedirectStandardInput = True
si.StartInfo.RedirectStandardOutput = True
si.StartInfo.RedirectStandardError = True
si.Start()
si.Close()

Comments

Popular posts from this blog

การตั้งเวลาระหว่าง Server และ Client

วิธีตั้งค่า NTP บน Primary Domain Controller

Installation and Run Node.JS on IIS