Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
MauricioDeAbreu
- Posts: 43
- Joined: 12 Dec 2021 06:45
#1
Post
by MauricioDeAbreu » 21 Feb 2022 07:41
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.
-
Aacini
- Expert
- Posts: 1913
- Joined: 06 Dec 2011 22:15
- Location: México City, México
-
Contact:
#2
Post
by Aacini » 21 Feb 2022 18:39
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