![]() | |
|
Welcome to the ABXZone Computer Forums forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | |
| . Join Date: Feb 2001
Posts: 2,669
| Cool! "Monitor Page File Use" script Found it HERE. copy and paste whats in the gray box to notepad and save as pf.vbs.. Double click on the file you saved and check it out. Lots of cool stuff like this at the TechNet Script Center Quote:
| |
| (Offline) | |
| | |||
| |
| | #2 |
| Registered User Join Date: Nov 2003 Location: Vancouver
Posts: 376
| nice link thanks
__________________ Intel Pentium 4 1.6 Asus P4S333 512mb DDR SDRAM WD600 WD2000JB Sony DVD-Rom LiteOn DVD-/+RW Antec P160 Perfomace One Case |
| (Offline) | |
| | #3 |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Coolio...neat! I modified the script to put all info in one screen instead of a bunch consecutively. Code: strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPageFiles = objWMIService.ExecQuery _
("Select * from Win32_PageFileUsage")
For each objPageFile in colPageFiles
Wscript.Echo "AllocatedBaseSize: "& vbTab & objPageFile.AllocatedBaseSize &Chr(13)&Chr(10) _
& "CurrentUsage: "& vbTab & objPageFile.CurrentUsage &Chr(13)&Chr(10) _
& "Description: "& vbTab & objPageFile.Description &Chr(13)&Chr(10) _
& "InstallDate: "& vbTab & objPageFile.InstallDate &Chr(13)&Chr(10) _
& "Name: "& vbTab & objPageFile.Name &Chr(13)&Chr(10) _
& "PeakUsage: "& vbTab & objPageFile.PeakUsage
Next |
| (Offline) | |
| | #4 |
| . Join Date: Feb 2001
Posts: 2,669
| KT, YOU DA MAN!!! ![]() |
| (Offline) | |
| | #5 | |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Quote:
| |
| (Offline) | |
| | #6 | |
| . Join Date: Feb 2001
Posts: 2,669
| Quote:
![]() Mods - I'd like to nominate KT's script as a sticky. | |
| (Offline) | |
| | #7 | |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Quote:
Second...instead of another sticky....things like this should go over in "articles" or "downloads" which NEVER get used and SHOULD! IMO anyway... | |
| (Offline) | |
| | #8 |
| . Join Date: Feb 2001
Posts: 2,669
| You can submit it to the downloads section at http://www.abxzone.com/download.php?op=AddDownload . Let me know if you need a server to put it on. |
| (Offline) | |
| | #9 |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Why don't we just post it in the (already sticky) Coolest Utilities thead? |
| (Offline) | |
| | #10 |
| . Join Date: Feb 2001
Posts: 2,669
| p.s. - I have 3 page files, what should I change to display all 3 at once? |
| (Offline) | |
| | #11 | |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Quote:
But.....My educated guess is this: For each objPageFile in colPageFiles appears to be "trying" to display all page files...my guess is you would probably need to figure out some way of changing how "colPageFiles" was initialized. It kind of looks like it *should* be doing this already....or else I don't know why he was doing a foreach loop in the first place. | |
| (Offline) | |
| | #12 |
| . Join Date: Feb 2001
Posts: 2,669
| |
| (Offline) | |
| | #13 | |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Quote:
If you find the doucmentation...PM it along, and maybe I'll play with it some time when I have a free few hours to tinker. | |
| (Offline) | |
| | #14 |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Hehe....this was fun.... Here is another script to list all your network shares...I found it here: http://www.activexperts.com/activmon...les/wmiremote/ Had to modify this one too..... Code: Option Explicit
ListShares()
Sub ListShares()
Dim strObject
Dim colShares
Dim objWMIService, objShare
Dim ShareNames
Set objWMIService = GetObject( "winmgmts:" )
Set colShares = objWMIService.ExecQuery( "Select * from Win32_Share" )
For Each objShare In colShares
ShareNames = ShareNames & objShare.Name & " [" & objShare.Path & "]" & Chr(13) & Chr(10)
Next
Wscript.Echo ShareNames
End Sub |
| (Offline) | |
| | #15 |
| The Shade of Lazarus Join Date: Jun 2002 Location: PM me to keep in contact
Posts: 26,003
| Here was a page with more fun vbs (and perl) stuff: http://www.tc.cornell.edu/services/e...ore.asp#Sec1.1 Taken from that page (as is, no modifications needed): A sysinfo script. Code: '***************************************************************************
'
' 10-07-01
' Simple VB Script to illustrate use of WMI to gather system information
' and display it in the same format at the Windows Management Console
'
'***************************************************************************
Set SystemSet = GetObject("winmgmts:").InstancesOf ("Win32_ComputerSystem")
for each System in SystemSet
system_name = System.Caption
system_type = System.SystemType
system_mftr = System.Manufacturer
system_model = System.Model
next
Set ProcSet = GetObject("winmgmts:").InstancesOf ("Win32_Processor")
for each System in ProcSet
proc_desc = System.Caption
proc_mftr = System.Manufacturer
proc_mhz = System.CurrentClockSpeed
next
Set BiosSet = GetObject("winmgmts:").InstancesOf ("Win32_BIOS")
for each System in BiosSet
bios_info = System.Version
next
Set ZoneSet = GetObject("winmgmts:").InstancesOf ("Win32_TimeZone")
for each System in ZoneSet
loc_timezone = System.StandardName
next
Set OS_Set = GetObject("winmgmts:").InstancesOf ("Win32_OperatingSystem")
for each System in OS_Set
os_name = System.Caption
os_version = System.Version
os_mftr = System.Manufacturer
os_build = System.BuildNumber
os_dir = System.WindowsDirectory
os_locale = System.Locale
os_totalmem = System.TotalVisibleMemorySize
os_freemem = System.FreePhysicalMemory
os_totalvirmem = System.TotalVirtualMemorySize
os_freevirmem = System.FreeVirtualMemory
os_pagefilesize = System.SizeStoredInPagingFiles
next
strResponseText = ("OS Name: " & os_name & Chr(10))
strResponseText = strResponseText & ("Version: " & os_version & " Build " & os_build & Chr(10))
strResponseText = strResponseText & ("OS Manufacturer: " & os_mftr & Chr(10))
strResponseText = strResponseText & ("System Name: " & system_name & Chr(10))
strResponseText = strResponseText & ("System Manufacturer: " & system_mftr & Chr(10))
strResponseText = strResponseText & ("System Model: " & system_model & Chr(10))
strResponseText = strResponseText & ("System Type: " & system_type & Chr(10))
strResponseText = strResponseText & ("Processor: " & proc_desc & " " & proc_mftr & " ~" & proc_mhz & "Mhz" & Chr(10))
strResponseText = strResponseText & ("BIOS Version: " & bios_info & Chr(10))
strResponseText = strResponseText & ("Windows Directory: " & os_dir & Chr(10))
strResponseText = strResponseText & ("Locale: " & os_locale & Chr(10))
strResponseText = strResponseText & ("Time Zone: " & loc_timezone & Chr(10))
strResponseText = strResponseText & ("Total Physical Memory: " & os_totalmem & "KB" & Chr(10))
strResponseText = strResponseText & ("Available Physical Memory: " & os_freemem & "KB" & Chr(10))
strResponseText = strResponseText & ("Total Virtual Memory: " & os_totalvirmem & "KB" & Chr(10))
strResponseText = strResponseText & ("Available Virtual Memory: " & os_freevirmem & "KB" & Chr(10))
strResponseText = strResponseText & ("Page File Space : " & os_pagefilesize & "KB" & Chr(10))
MsgBox strResponseText, 0,"System Summary Information" |
| (Offline) | |
![]() |
| Thread Tools | |
| Display Modes | |
| |