OK Add that to the number of books I must get.
 
    In the meantime.  As I dont have the book right now and I am very new to scripting.  What is the difference between the Direct Properties and the Indirect Properties?
 
    Have started modifying but now having the problems with setting the Computername.  In your script it is a const but I need it as a variable so that it goes thru the list of our Servers.
 
Thanks
 
Jeff
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alain Lissoir
Sent: Tuesday, September 06, 2005 11:13 AM
To: ActiveDir@mail.activedir.org
Subject: RE: [ActiveDir] LIL OT system Reg size script

Why not using WMI to achieve this? Just keep the file list as you did below and use WMI to update the registry size.
 
Check:
Sample 4.14 - SetWin32_RegistrySizeWithAPI (Direct Properties).wsf
or
Sample 4.15 - SetWin32_RegistrySizeWithAPI (Indirect Properties).wsf
at http://www.lissware.net, volume 1 samples.
 
HTH
/Alain


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Cothern Jeff D. Team EITC
Sent: Tuesday, September 06, 2005 8:00 AM
To: ActiveDir@mail.activedir.org
Subject: [ActiveDir] LIL OT system Reg size script

We recently had an issue where a policy seems to be causing the registry size to blow up on several of our servers.  We Believe we have found the culprit policy and are looking into it but we want to monitor things. On this front I am trying to put to gether a script that will go thru a list of our servers and check the file sys of the system registry. 
 
i.e.  check admin$\system32\config\system
 
here is what i have
 
On Error Resume Next
 
Const ForReading = 1
 
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("e:\scripts\servers.txt", ForReading)
 
Do Until objTextFile.AtEndOfStream
    strComputer = objTextFile.Readline
 
    ' =====================================================================
    ' Insert your code here
    ' =====================================================================
 
 WScript.Echo
 WScript.Echo "=========================================="
 WScript.Echo "Computer: " & strComputer
 WScript.Echo "=========================================="
 
Set objFile = objFSO.GetFile("admin$\system32\config\system")
Set objItem = strComputer.objFile
 
WScript.Echo "FileSize: " & objItem.FileSize
 
    ' =====================================================================
    ' End
    ' =====================================================================
 
Loop
 
objTextFile.Close
 
Where am I going wrong?
 
Jeff
 
 
 

Reply via email to