Re: [Dev-C++] Res: Clear/Delete a file that it is been used by services.exe
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Per W. <pw...@ia...> - 2006-12-06 13:29:18
|
Most operating systems are written in C or C++, so if something is possible to do in any language, it is most probably also possible using C or C++. The API you are interested in is called ClearEventLog(). Google should be able to supply the required information about how to use it. There is also the function BackupEventLog(). /Per W On Wed, 6 Dec 2006, KrowniX ()--() wrote: > Well, I have to remove becouse in the company that I work that=B4s the st= andart action to this situation, and don=B4t matter how much I talk with th= em they won=B4t change ...so I have to remove the old records in the event = viewer > > I also think like you..and I don=B4t see any reason of why we should eras= e the records in the event viewer once all that is really important it=B4s = save in a backup directoy. > > But...I was looking here..and unfortunely I think that it isn=B4t possibl= e to do this using c/c++...but I will try to do it using vbscript, but beei= ng honest with you I don=B4t think that will work....:( > > > ----- Mensagem original ---- > De: Per Westermark <pw...@ia...> > Para: KrowniX ()--() <kr...@ya...> > Cc: dev...@li... > Enviadas: Quarta-feira, 6 de Dezembro de 2006 10:06:20 > Assunto: Re: [Dev-C++] Clear/Delete a file that it is been used by servic= es.exe > > > Most importantly - why do you want to do it? > > Are they containing sensitive information that you want to remove, or is > it just that you want to keep older logs available? > > Most solutions for logging is to browse the event logs and extract all ne= w > entries to secondary files. By keeping track of last entry copied, there > is then no need to remove old entries. > > /Per W > > On Wed, 6 Dec 2006, KrowniX ()--() wrote: > > > Hi, > > > > Friends..I got a problem here... > > I have to do a robot that do the backup of the .evt files (c:\winnt\sys= tem32\config\*.evt) and after the backup is finished I need to delete those= files. > > > > Well...the first thing is easy...just copy the files...and compress the= n,, but, how do I delete a .evt file if it=B4s been used by the Event Viewe= r and the Event Viewer it is been executed on services.exe and Windows NT d= oesn=B4t allow me to make operations with it. > > > > Anyone knows ...some API...or have some idea about how do I solve this = problem?? > > > > Krownix > > > > > > > > _______________________________________________________ > > Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celul= ar. Registre seu aparelho agora! > > http://br.mobile.yahoo.com/mailalertas/ > > > > > > > > _______________________________________________________ > Novidade no Yahoo! Mail: receba alertas de novas mensagens no seu celular= =2E Registre seu aparelho agora! > http://br.mobile.yahoo.com/mailalertas/ > > |