Wmi Win32_Physicalmedia Serial Number
Hs.png' alt='Wmi Win32_Physicalmedia Serial Number' title='Wmi Win32_Physicalmedia Serial Number' />SOLVED Retrieving Hard Drive Serial Number via WMIC IT Programming. Im stuck. We are pushing out a bunch of new computers here at work and I wrote a batch file that prompts the install tech for the office and desk number then it records the computer name, serial number, install datetime, office, desk, and install technicians name to a csv for inventory purposes Ive been told that we are going to need to record the hard drive serial number as well and I would like to add it to my script but Im having an issue. Xxclone Pro Edition Free'>Xxclone Pro Edition Free. I the command WMIC diskdrive get serialnumber to return the serial number to a variable in the script but for some reason the serial numbers didnt match up, upon closer inspection the serial number being returned by the script and the one printed on the label are the same characters just ever other character is reversed i. Wmi Win32_Physicalmedia Serial Number' title='Wmi Win32_Physicalmedia Serial Number' />Z3. TV1. 04. H becomes 3. ZVT0. 1H4. Ill gladly post up the actual meat of the script if anyone thinks it will help. Airwolf Season 1 Episode 1 Torrent Download. Experts Exchange Questions How to get HARDWARE serialnumber of harddisk drives with WMI or any other reliable API. How to join in a WMI Query WQLWQL doesnt support the JOIN clause. You need to use the ASSOCIATORS OF statement as you guessed. Heres an example in VBScript str. Computer. Set o. WMI Get. Objectwinmgmts str. Myplaycity Top 100 Games Free Download'>Myplaycity Top 100 Games Free Download. Computer rootCIMV2. Set col. Partitions o. WMI. Exec. Query. SELECT FROM Win. Disk. Partition WHERE Boot. PartitionTrue. Free VB Code and Free Visual Basic. NET Source code, Examples, Tutorials, Links, and other resources. Wmi Win32_Physicalmedia Serial Number' title='Wmi Win32_Physicalmedia Serial Number' />For Each o. Partition in col. Partitions. Set col. Drives o. WMI. Exec. Query. ASSOCIATORS OF Win. Disk. Partition. Device. ID. o. Partition. Device. ID WHERE Result. ClassWin. 32Disk. Drive. For Each o. Drive in col. Drives. WScript. Echo o. Drive. Serial. Number. Note, however, that the Win. Disk. Drive. Serial. Number property isnt available prior to Windows Vista. So, if you want your code to work on earlier Windows versions as well e. Windows XP or Windows 2. APIs other than WMI. Edit reply to comment Yes, you can add a nested ASSOCIATORS OF query to get the Win. Physical. Media instances corresponding to the Win. Disk. Drive instances something like this. For Each o. Drive in col. Drives. Set col. Media o. WMI. Exec. Query. ASSOCIATORS OF Win. Disk. Drive. Device. ID. o. Drive. Device. ID WHERE Result. ClassWin. Physical. Media. For Each o. Media in col. Media. WScript. Echo o. Media. Serial. Number. You havent said what language youre using I guess in Power. Shell or C the whole thing can be done more elegantly, but VBScript is pretty verbose.