Tuesday, September 19, 2006
Thursday, September 14, 2006
Eventquery.vbs on Windows 2000
I was looking for a way to query the event log on a Windows 2000 Server machine. References on the Microsoft site listed it in the resource kit. Other references at TechRepublic and VisualBasicScript.com led me to believe it was only on Windows XP and Windows 2003 Server.
I tried simply copying the eventquery.vbs file from a Windows XP Pro computer to the %windows%\system32 folder, however, on running the script, received the error, Unable to include the common module"CmdLib.Wsc". I copied the file cmdlib.wsc as well, to no avail.
The VisualBasicScript.com site led me to believe it was somehow registered in the registry. So I ran
C:\WINNT\system32>regsvr32 cmdlib.wsc
and lo, and behold, the script now runs.
C:\WINNT\system32>cscript eventquery.vbs /?
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
EVENTQUERY.vbs [/S system [/U username [/P password]]] [/FI filter]
[/FO format] [/R range] [/NH] [/V] [/L logname | *]
Labels: windows