Set objFile = objFSO.GetFile("admin$\system32\config\system")
Set objItem = strComputer.objFile
Set objItem = strComputer.objFile
WScript.Echo "FileSize: " & objItem.FileSize
Should be replaced with
Set objFile = objFSO.GetFile( "\\" & strComputer & "\admin$\system32\config\system")
WScript.Echo "FileSize: " & objFile.FileSize
On 9/6/05, Alain Lissoir <[EMAIL PROTECTED]> wrote:
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).wsforSample 4.15 - SetWin32_RegistrySizeWithAPI (Indirect Properties).wsfat 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: [email protected]
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\systemhere is what i haveOn Error Resume NextConst ForReading = 1Set 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.objFileWScript.Echo "FileSize: " & objItem.FileSize' =====================================================================
' End
' =====================================================================LoopobjTextFile.CloseWhere am I going wrong?Jeff
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Fortune and Love befriend the bold"
~~~~~~~~~~~~~~~~~~~~~~~~~~~
