ログファイルは、C:\ttermlog の下に YYYYMMDD-HHMMSS.logという形式で生成されます。
Dim WshShell, AppName, oExec, NowTime, LogPath, LogName Dim dtmNowDate 'Get current date and time dtmNowDate = Now() 'Set log file, YYMMDD-HHMM.log style LogPath = "D:\Teralog\" LogName = LogPath & _ Right("0" & Year(dtmNowDate), 2) & _ Right("0" & Month(dtmNowDate), 2) & _ Right("0" & Day(dtmNowDate), 2) & "-" & _ Right("0" & Hour(dtmNowDate), 2)& _ Right("0" & Minute(dtmNowDate), 2) & _ ".log" 'Set application command line AppName = "C:\Program Files\teraterm\ttermpro.exe" & _ " /L=" & LogName 'Startup TeraTerm program Set WshShell = CreateObject("WScript.Shell") Set oExec = WshShell.Exec(AppName)