Hi All, Here's what i want to achieve. We have this email archive database which we optimize on a weekly basis . At the moment we are manually logging in run the command and monitor the status. The optimization can take anywhere between 3-12 hours which is making us login every few hours and check if it has finished or not etc. What i want to do is create a batch file and schedule a task to run the batch file. Now when the batch file starts, i event to generate a event ID (and then i can capture this evend id and generate a email via our monitoring sytem) and similarly when the optimization finishes generate event id in the application log. Here what i was thinking of doing:-
@echo off
cd C:\Program Files\Quest Software\ArchiveManager
C:\WINDOWS\system32\cmd.exe /K "Archive Full Text Index Service" –optimize
IF errorlevel 1 Goto Stoppd
exit
:Stoppd
eventcreate /l application /t information /so 9999 /id 1 /d "the optimization has started "
:end
I am very bad with batch files and scripts. Can someone please advise on how to generate event.? Thanks