Hi Nquizitive,
Copy the code notepad and save the file with .vbs extension (e.g. systeminfo.vbs) then double-click file to execute the script.
The script uses WMI to query the machine for system information. When you execute the script it performs following steps:
1. Connect to the WMI service
2. Retrieve Instances of WMI managed ResourcesCode:strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
3. Echo the value of propertiesCode:Set colSettings = objWMIService.ExecQuery _ ("Select * from Win32_ComputerSystem")
Using WMI you can query a wide variety of system information. Check out these scriptsCode:Wscript.Echo "OS Name: " & objOperatingSystem.Name Wscript.Echo "Version: " & objOperatingSystem.Version Wscript.Echo "Service Pack: " & _ objOperatingSystem.ServicePackMajorVersion _ & "." & objOperatingSystem.ServicePackMinorVersion Wscript.Echo "OS Manufacturer: " & objOperatingSystem.Manufacturer Wscript.Echo "Windows Directory: " & _ objOperatingSystem.WindowsDirectory Wscript.Echo "Locale: " & objOperatingSystem.Locale Wscript.Echo "Available Physical Memory: " & _ objOperatingSystem.FreePhysicalMemory Wscript.Echo "Total Virtual Memory: " & _ objOperatingSystem.TotalVirtualMemorySize Wscript.Echo "Available Virtual Memory: " & _ objOperatingSystem.FreeVirtualMemory Wscript.Echo "Size stored in paging files: " & _ objOperatingSystem.SizeStoredInPagingFiles
http://www.microsoft.com/technet/scr...e/default.mspx




Reply With Quote
Bookmarks