Shell.Run


WSHでコマンド等を実行するのは以下の通り


shell.vbs

Dim shell 
Dim rtn

'Shellオブジェクトを生成
Set shell = WScript.CreateObject("WScript.Shell")

'コマンドを実行する ※・・・/Cオプションはコマンドを実行後、終了する。
rtn = shell.Run("CMD /C COPY C:\a.txt D:\", 1, true)

Set shell = Nothing


・Shell.Runの引数について


第1引数・・・実行するコマンドライン
第2引数・・・実行された際のウインドウのスタイル
第3引数・・・アプリケーションが終了するまで待機