![]() ![]() The Windows Dev Center has a great collection of example scripts split into various areas of usefulness in the WMI Tasks for Scripts and Applications. Query information from the BIOS like the PC’s serial number and manufacturerįind out about the CPU (Number of cores, name, clockspeed)įind out about the PC (Manufacturer, Model, and much more)įind out about the OS (active operating system’s name, version, etc) Classesįinding out about software installed by Windows Installer, particularly Name and Version ![]() ![]() This table shows some of the common ones I used in the example scripts at the bottom. Each class has a variety of properties within them that might contain the values you seek. To find the information you want, you will have to query the correct class. They offer a lot more flexibility of what to do with the results and with a better interface. Scripting with PowerShell and VBScript are other ways to access the WMI and are more common. In the command prompt run WMIC /? for more information.Īs an example, here I am querying the architecture (32-bit or 64-bit) of the operating system: WMIC OS GET OSArchitecture It offers its own command line tool on Windows XP Pro, Server 2003, Vista, Win7, and Server 2008 with WMIC. The key to getting this information from the computer is WMI, Windows Management Instrumentation, extensions to the Windows Driver Model that allows us to interface with the operating system and hardware. Of course, this is just a single use case and there are plenty of other ways this information could be used. If you want to get fancy, you could write a script to get all your information from a single place. Sometimes that means crawling under a desk, opening the case, or visiting various locations within Windows to find all the properties you are wanting. Public Function GetHardDiskSerial(Optional sDrive As String) As Longĭim lNumber As Long, sBuffer As String * 255Ĭall GetVolumeInformation(sDriv e$
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |