Consider the following scenario. You connect a USB flash drive to a computer that is running Windows 7 or Windows Server 2008 R2. You try to run one of the following Windows Management Instrumentation Command-line (WMIC) tool commands to query the hard disk drives on the computer:
This issue occurs because the XML parser treats the control characters that are included in the serial number of some drives as invalid. Therefore, the XML parser cannot parse content that includes these control characters. This behavior causes valid results for other drives to be displayed incorrectly, together with the behavior that is mentioned in the "Symptoms" section.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:
=supportNote The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
The global version of this hotfix installs files that have the attributes that are listed in the following tables. The dates and the times for these files are listed in Coordinated Universal Time (UTC). The dates and the times for these files on your local computer are displayed in your local time together with your current daylight saving time (DST) bias. Additionally, the dates and the times may change when you perform certain operations on the files.
Important Windows 7 hotfixes and Windows Server 2008 R2 hotfixes are included in the same packages. However, hotfixes on the Hotfix Request page are listed under both operating systems. To request the hotfix package that applies to one or both operating systems, select the hotfix that is listed under "Windows 7/Windows Server 2008 R2" on the page. Always refer to the "Applies To" section in articles to determine the actual operating system that each hotfix applies to.
The MANIFEST files (.manifest) and the MUM files (.mum) that are installed for each environment are listed separately in the "Additional file information for Windows 7 and for Windows Server 2008 R2" section. MUM and MANIFEST files, and the associated security catalog (.cat) files, are critical to maintaining the state of the updated component. The security catalog files, for which the attributes are not listed, are signed with a Microsoft digital signature.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing the problem described in this article. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, contact Microsoft Customer Service and Support to obtain the hotfix.
The first exec is running fine and giving the right return, but I'm having problems with the second exec, where I'm getting: ERROR: Description = Invalid query. In my search for a fix for that error, I found that because I'm using C++ I should be using native wmi queries, but unfortunately each result with code examples that I found were "like 3 pages" of code. Does anyone know of some more simple examples for wmi queries?
As for the code, I'm trying to get the model and serial number of the disk that the OS is installed on for some unique identification of app install and some other minor checks. And for this, I found that using wmic bootconfig get description, you can parse that result (Description\Device\Harddisk3\Partition1, 3 is the index) and get the index of the disk the OS is installed on, then using that index and wmic diskdrive where DeviceID='\\.\PHYSICALDRIVE3' get model,serialnumber where you change the 3 from PHYSICALDRIVE3 with the index from last command, you get the model and serial number. The code above is just a test to see the commands working, later I was going to parse the result and update the second exec call, right now it's using the index for my PC that I know were the OS is installed.
And yes, I know that the user can simply install the OS on a different disk and so the model and/or serial number would be different, but having to go though all that is enough of a hindrance to actually affect my use case, as I only care when the app is launched, and not on how many machines is installed on, that is IF the user finds that I'm using this verification method in the first place.
//Edit based on the suggestion on accepted answer I tried with more \ and in the end I made it work. I gave up on trying to use native wmi, and I made it work with CMD call like this which also parses the returns and in the end you get straight model and serial number.
OK, then I'll stick with what I have, now that it is working. It is a small thing to waste so much time on it. Thanks for your reply. In testing I never tried with so many , but after your reply I did more testing and found that solution.
Hey guys, so I was wondering if there' a way to pull up serial number via cmd or powershell. Using the command "wmic diskdrive get serialnumber" in cmd or the command "get-wmiobject win32_diskdrive select serialnumber" both pull up what appears to be an EUI number. I have tried this with a different drive (albeit a different brand) and have confirmed that this is pulling up the EUI number, not the serial number. The number I'm getting back is a series of four quartets separated by underscores, which line up with the formatting of the drive that I have confirmed is reporting EUI as serialnumber. Is there possibly a different command I can use or a database where I can lookup the serial number by EUI? I have also tried "get-physicaldisk select-object serialnumber" in powershell. They all pull back the EUI number.
Regarding PowerShell and other methods to read the serial number, the one we provide/recommend is using the Intel Memory and Storage Tool (GUI or CLI), as previously mentioned by Jos_B, and some other Intel tools like Intel SSU and Intel RST can read this number too, even third-party tools, so it is not actually hidden from the system, but there are no instructions we can provide as it is beyond our scope of support.
With this being said, I will keep the thread open in case other community members would like to offer their input, and if I can try to assist you with anything else, just let me know, I will follow up again on November 15th.
Yeah, I'm not installing a third-party tool or any additional software. I'd have the user open the machine and read the label on the drive itself before installing unnecessary software. So far nobody has even addressed any of my questions, the questions being: "Why are powershell and command prompt both pulling up EUI when I poll serial number?" "Is there a command I am overlooking that could pull up the serial number?" "Is there a database that could get me the serial number by inputting the EUI number?" I suppose I'm not 100% sure what the EUI is even for.
Searching online, as you may have already tried, I found a few threads from different sites with similar problems, with some users mentioning that this will vary depending on the SSD manufacturer, some users mention that it works, others mention that it does not, and get a similar result to the one you have described.
With PowerShell being a native Windows feature, it may be possible to present your inquiries to Microsoft to check if they can provide you with an appropriate answer, since from our side we can only recommend using our Intel SSD software, and you have already mentioned that this does not work work you.
We previously shared that with this being related to PowerShell commands, the best option is to check with Microsoft for assistance, as we can only recommend the use of our specific SSD tools in order to obtain SSD information.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
795a8134c1