Hi all,
Is there an instruction in Matlab I can use to get and save Drive Serial Information of an installed hard drive (ex. C:\ drive)? Any suggestion will be helpful!
Thanks in advance

 採用された回答

Walter Roberson
Walter Roberson 2022 年 8 月 25 日

0 投票

S = system('wmic diskdrive get serialNumber')
Though I see some sites say
S = system('wmic bios get serialNumber')
The output is probably going to be two lines, with the first one being a header.
At the moment I do not know what happens if you have multiple drives.

1 件のコメント

Chunru
Chunru 2022 年 8 月 25 日
編集済み: Chunru 2022 年 8 月 25 日
It list all drives installed in the system. For my machine, it lists down 4 disks installed.

サインインしてコメントする。

その他の回答 (2 件)

Chunru
Chunru 2022 年 8 月 25 日

0 投票

For windows machine, you can do the following:
[status, outpyt] = system("wmic diskdrive get model,serialnumber")
Iacopo
Iacopo 2022 年 8 月 26 日

0 投票

Thanks everyone! With a small change, what I needed was:
S = system('wmic volume get serialNumber')
Thanks!

カテゴリ

ヘルプ センター および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品

質問済み:

2022 年 8 月 25 日

回答済み:

2022 年 8 月 26 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by