Page 1 of 1

Get Optical Drive Serial

Posted: 21 Feb 2022 07:41
by MauricioDeAbreu
Good friends.

I'm having trouble getting the serial from the optical drive on my laptop.

I have tried the following without success:

Code: Select all

wmic cdrom get serialnumber
wmic cdrom D: get serialnumber
wmic cdrom where drive='D:' get serialnumber
wmic cdrom where mediatype!='unknown' get SerialNumber
wmic /output:stdout  cdrom where mediatype!='unknown' get SerialNumber
Fun fact, using these I don't get the serial in the list either.

Code: Select all

wmic /output:stdout  cdrom get /all /format:list
wmic cdrom where mediatype!='unknown' get /all /format:list
Any idea how to get it?

Thanks in advance for any help you can give me.

Re: Get Optical Drive Serial

Posted: 21 Feb 2022 18:39
by Aacini
Perhaps this works:

Code: Select all

FindRepl "/S:wmiCollection('Win32_CDROMDrive','SerialNumber')" /J
For a further description on FindRepl.bat program, see this post

Antonio