IIS Server - How to program a routine to change the log path ?

This is Interesting: Free IT Magazines  
Home > Archive > IIS Server > June 2005 > How to program a routine to change the log path ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How to program a routine to change the log path ?
icefire

2005-06-29, 2:48 am

I'd like to know how to program a routine to change the log path of all
FTP sites and Web Sites on my local machine?Which API should I use?

In addition,Is there a way to get current user-linked-count and the size
of log file?

Any suggestion are appreciated !Thank you!
Egbert Nierop \(MVP for IIS\)

2005-06-29, 2:48 am

Hi,

Use adsutil
cscript.exe c:\inetpub\adminscripts\adsutil.vbs GET W3SVC\LogfileDirectory

there is also a way to set it
cscript.exe c:\inetpub\adminscripts\adsutil.vbs SET
W3SVC\LogfileDirectory="D:\Logfiles"

--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm

"icefire" <icefire@discussions.microsoft.com> wrote in message
news:EF59FCB9-AA18-4AA2-9F83-C4536AB178AF@microsoft.com...
> I'd like to know how to program a routine to change the log path of all
> FTP sites and Web Sites on my local machine?Which API should I use?
>
> In addition,Is there a way to get current user-linked-count and the
> size
> of log file?
>
> Any suggestion are appreciated !Thank you!


icefire

2005-06-29, 2:48 am

Thank you very much!
I did something as you said:
> Use adsutil
> cscript.exe c:\inetpub\adminscripts\adsutil.vbs GET W3SVC\LogfileDirectory


The result:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
ErrNumber: -2147467259 (0x80004005)
Error Trying To GET the Schema of the property:
IIS://localhost/Schema/W3SVC\LogfileDirectory

> there is also a way to set it
> cscript.exe c:\inetpub\adminscripts\adsutil.vbs SET
> W3SVC\LogfileDirectory="D:\Logfiles"

The result:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Error: Wrong number of Args for the SET command

Why?

And would you please tell me how to get the user-connected-count and log
file size?
Thank you very much!
Egbert Nierop \(MVP for IIS\)

2005-06-29, 7:52 am

"icefire" <icefire@discussions.microsoft.com> wrote in message
news:A11733AB-781F-419C-94C1-56BCC262A741@microsoft.com...
> Thank you very much!
> I did something as you said:
>
> The result:
> Microsoft (R) Windows Script Host Version 5.6
> Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
> ErrNumber: -2147467259 (0x80004005)
> Error Trying To GET the Schema of the property:
> IIS://localhost/Schema/W3SVC\LogfileDirectory
>
> The result:
> Microsoft (R) Windows Script Host Version 5.6
> Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
>
> Error: Wrong number of Args for the SET command


My mistake. Remove the = (equal) sign and retry.

> Why?
>
> And would you please tell me how to get the user-connected-count and log
> file size?
> Thank you very much!


Please try to find this yourselves first. I am not against helping you, but
I like you to help to find it as well yourselves.
Run
ADSUTIL.VBS ENUM W3SVC
you'll see a list of parameters you can GET and SET

These parameters are among the list your retrieve then.

Success

icefire

2005-06-29, 7:52 am

Thank you very much!
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com