返回上一頁

VB and C# 跑批次檔 or 執行檔

VB

Dim Shell As Object

Shell = CreateObject("WScript.Shell")

Shell.Run("xxx.exe")

C#

System.Diagnostics.Process.Start("xxx.exe");

C#要很刁鑽的用VB跑也是可以 XD

dynamic ws = Microsoft.VisualBasic.Interaction.CreateObject("WScript.Shell");

ws.Run("Notepad.exe");

以上方法 webfrom winform 皆適用