TeraTermPro ログ出力設定起動スクリプト
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
**概要 [#q317da01]
ログファイルは、C:\ttermlog の下に YYYYMMDD-HHMMSS.logと...
**コード [#zb57232a]
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)
終了行:
**概要 [#q317da01]
ログファイルは、C:\ttermlog の下に YYYYMMDD-HHMMSS.logと...
**コード [#zb57232a]
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)
ページ名: