注册 登录
编程论坛 VB.NET论坛

如何调用系统命令

god1502 发布于 2010-12-08 12:36, 990 次点击
我要点击一个Button1_Click后就运行shutdown -s -f -t 3600 这个命令怎么弄
1 回复
#2
jocksun2011-02-14 15:43
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim ProcID As Integer
        ' Start the Calculator application, and store the process id.
        ProcID = Shell("SHUTDOWN.EXE -S -T 3000", AppWinStyle.NormalFocus)
      
    End Sub
1