![]() |
China DOS Union-- Unite DOS · Advance DOS · Grow DOS --Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum |
| Guest | Log in | Register | Members | Search | China DOS Union |
|
中国DOS联盟论坛 The time now is 2026-09-15 12:58 |
47,812 topics / 349,917 posts / today 0 new / 48,268 members |
| DOS批处理 & 脚本技术(批处理室) » Regarding the issue of reading Log Event with WSH scripts. |
| Printable Version 1,890 / 5 |
| Floor1 piziliu2004 | Posted 2006-08-18 16:51 |
| 中级用户 Posts 139 Credits 321 | |
|
I want to achieve the following operations but don't know how to start. I can't find relevant materials.
Note that it's implemented with a script, not by manual export methods. 1: Save all local log events to a text file or an Excel file. 2: Query the local log events, respectively by (Type Date Time Source Category Event User Computer) to find. For example, find the detailed message of the event with ID 1000. |
|
| Floor2 electronixtar | Posted 2006-08-18 17:57 |
| 铂金会员 Posts 2,672 Credits 7,493 | |
|
My usual practice is to run logfiles and then look at them one by one, heh
|
|
| Floor3 3742668 | Posted 2006-08-18 21:44 |
| 荣誉版主 Posts 718 Credits 2,013 | |
|
Well, under the %windir%\system32 directory, the system comes with a vbs script Eventquery.vbs. Using this script, the requirements you mentioned can be met. The system requires it to be run under cscript.exe. You can use a format like cscript %windir%\system32\eventquery.vbs + parameters to use it.
For example: |
|
| Floor4 piziliu2004 | Posted 2006-08-20 09:26 |
| 中级用户 Posts 139 Credits 321 | |
| Floor5 lxmxn | Posted 2006-10-21 07:58 |
| 版主 Posts 4,938 Credits 11,386 | |
|
Great! I've learned a lot.
It seems there are many things in the system worth our discovery and utilization. |
|
| Floor6 ymtien | Posted 2006-10-21 08:22 |
| 初级用户 Posts 11 Credits 36 | |
|
Actually, you can back up the eventlog with a WSH script. I used the dumpel.exe tool from the Windows Server Resource Kit in combination because the log records exported by the WSH script are.evt files, not plain text files, and they can only be opened with Event Viewer. Opening them with a text editor will result in garbled text. To make it easy to view, I used the dumpel.exe tool to export the log to a txt file. The WSH script you mentioned is available on Microsoft's website! Thanks
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |