WinXP下At,Schtask和Eventtriggers命令实例(三)

C:\>eventtriggers
INFO: No event triggers found.
C:\>eventtriggers /create /tr Mytrigger /tk notepad.exe /eid 1000 /l application
 /t error /d "Mydescription"
SUCCESS: The Event Trigger "Mytrigger" has been created.
创建自定义触发器
C:\>eventtriggers /create /tr mytrigger /tk notepad.exe /so custom
SUCCESS: The Event Trigger "mytrigger" has been created.
用eventcreate命令进行测试。
C:\>eventcreate /l application /so custom /t information /id 100 /d "description
"
SUCCESS: A 'information' type event is created in the 'custom' log/source.
用schtasks命令结束测试的自定义触发器
C:\>schtasks /end /tn mytrigger1163028
SUCCESS: The scheduled task "mytrigger11630284" has been terminated successfully

C:\>taskkill /im notepad.exe /f
SUCCESS: The process "notepad.exe" with PID 188 has been terminated.
以system账户创建远程计算机自定义触发器
C:\>eventtriggers /create /s \\Z-62C2385F578E4 /u administrator /p windows /tr M
yremotetest /tk notepad.exe /eid 1000 /d "Mytestdescription"
SUCCESS: The Event Trigger "Myremotetest" has been created.
用eventcreate测试远程计算机自定义触发器
C:\>eventcreate /s \\Z-62C2385F578E4 /u administrator /p windows /l application
/id 1000 /t information /d "testremotetrigger"
使用schtasks发现成功运行
C:\>schtasks /query /s \\Z-62C2385F578E4 /u administrator /p windows
TaskName                             Next Run Time            Status
==================================== ======================== ===============
Myremotetest14061950                 Never                    Running

你可能感兴趣的:(职场,at,休闲)