astar666
asked on
vbs script to write to application log file
I have some vbs scripts, actually windows script host stuff. I ask for a vbs script that writes a message to the applicaton log file, that is, that which is viewed by the event viewer. I will then integrate that into my existing vbs scripts.
ASKER
I do not have visual basic on my machine, but I search around on the web page to find the code you referenced, thinking it might provide a clue. I did not find it. For completeness, here is an example vbs script which I want to write to the application event log file.
set WshShell = CreateObject("WScript.Shel l")
WshShell.Run "%SystemRoot%\System32\cle anmgr.exe"
WScript.Sleep 2000
WshShell.SendKeys "{ENTER}"
wscript.sleep 1000
While WshShell.AppActivate("Disk Cleanup for")= FALSE
wscript.sleep 5000
Wend
wscript.sleep 1000
WshShell.SendKeys "{ENTER}"
wscript.sleep 1000
WshShell.SendKeys "{ENTER}"
While WshShell.AppActivate("Disk Cleanup for")= FALSE
wscript.sleep 5000
Wend
set WshShell = CreateObject("WScript.Shel
WshShell.Run "%SystemRoot%\System32\cle
WScript.Sleep 2000
WshShell.SendKeys "{ENTER}"
wscript.sleep 1000
While WshShell.AppActivate("Disk
wscript.sleep 5000
Wend
wscript.sleep 1000
WshShell.SendKeys "{ENTER}"
wscript.sleep 1000
WshShell.SendKeys "{ENTER}"
While WshShell.AppActivate("Disk
wscript.sleep 5000
Wend
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://kandkconsulting.tripod.com/VB/VBCode.htm