Rotate Firewall logfile

  • Thread starter Thread starter ZoombyWoof
  • Start date Start date
Z

ZoombyWoof

HI all.
I would like the same behaviour on the Microsoft Firewall logfile that
you have on logfiles under unixes, you can make them rotate so that once
a week or once a day the system renames the logfile to 'name'.1 and
creates a new one.

How can I do this from C# ?

I have looked in the help about ServiceController, and I made a few
testprograms that can show me the running services on the system, but I
cant see the Firewall service. One approach I had in mind was that from
C# stop the firewall, rename the file and start the firewall service
again. It seems that the firewall runs in svchost with -k netsvcs as
parameter...

Any ideas ?

Thanx in advance

/ZW
 
I would like the same behaviour on the Microsoft Firewall logfile that
you have on logfiles under unixes, you can make them rotate so that once
a week or once a day the system renames the logfile to 'name'.1 and
creates a new one.

How can I do this from C# ?

I have looked in the help about ServiceController, and I made a few
testprograms that can show me the running services on the system, but I
cant see the Firewall service. One approach I had in mind was that from
C# stop the firewall, rename the file and start the firewall service
again. It seems that the firewall runs in svchost with -k netsvcs as
parameter...

Any ideas ?

You could use process to issue a net stop SharedAccess (that's the service
name in Windows XP SP1, not sure if it's the same in SP2), rename the log
file, and then restart the service net start SharedAccess.
 
Tom said:
You could use process to issue a net stop SharedAccess (that's the service
name in Windows XP SP1, not sure if it's the same in SP2), rename the log
file, and then restart the service net start SharedAccess.
Thanx! I didn't recognize the name SharedAccess when I was looking for
the name of the service...sloppy me...:-)

/ZW
 
Thanx! I didn't recognize the name SharedAccess when I was looking for
the name of the service...sloppy me...:-)

Easy way to find the name of a service is to go to Control Panel,
Administrative Tools, Services. Double click, or right click and select
Properties, the service and the Service Name will be on the general tab.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top