473,320 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Rotate Firewall logfile

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
Nov 16 '05 #1
3 2218
On Wed, 02 Feb 2005 18:25:16 +0100, ZoombyWoof wrote:
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 Porterfield
Nov 16 '05 #2
Tom Porterfield wrote:
On Wed, 02 Feb 2005 18:25:16 +0100, ZoombyWoof wrote:

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.

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

/ZW
Nov 16 '05 #3
On Wed, 02 Feb 2005 23:48:40 +0100, ZoombyWoof wrote:
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.
--
Tom Porterfield
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: FJ | last post by:
Hi all, I hope someone can help me with the following: I want my database to make a logfile in which it puts the date and time a code is used. The code is triggered by a timer. Every x mins it...
3
by: byrd48 | last post by:
Hi, I am developing a web site which allows users to upload and share photos. I have a datalist which lists the photos and has the usual edit, update commands. Within the edititemtemplate, I...
17
by: santel_helvis | last post by:
Hi All, Could anyone tell me how to rotate the image in javascript. Which concepts I should concentrate to rotate the image
8
by: lovecreatesbeauty | last post by:
I write a function to rotate a matrix by 90 degrees clockwise, this function works on a matrix of specific size, for example, it rotates a 4*4 matrix of integers in the following code. The function...
2
by: Andi Clemens | last post by:
Hi, we had some problems in the last weeks with our mailserver. Some messages were not delivered and we wanted to know why. But looking through the logfile is a time consuming process. So I...
6
by: roger.lagrilliere | last post by:
Hello, is anyone willing to help me out to setup a logfile. I have a program running in Access, but I want to know the progress of it. It is rather easy I think, but don't know how to handle...
8
by: Samuel Shulman | last post by:
Is it possible and how to rotate pictures in HTML document Thank you, Samuel
10
by: Joey_Stacks | last post by:
Does anyone know of a scipt that will rotate random div layers on page refresh? I have a primary content area front and center on my site homepage, and I'd like to rotate various chunks of html...
2
by: pompom | last post by:
hello all! i have to make a project for school , making a newsserver and a client. the thing is, i send messages between them to let the user know if everything is running ok. just some simple...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.