CUsersFZWDesktopfor F skip=1 tokens= i in wmic diskdrive where index=0 get modelserialnumber do set SSDMODEL=i sersFZWDesktopset SSDMODEL=Hoodisk SSD KBTMC9A21213962 sersFZWDesktopset SSDMODEL
The command you executed is trying to retrieve the model and serial number of the disk drive with index 0 using the WMIC command. However, it seems that the output is not as expected. The variable "SSDMODEL" is being set with unexpected values.
Here's the corrected command:
for /F "skip=1 tokens=*" %i in ('"wmic diskdrive where index=0 get model,serialnumber"') do (set "SSDMODEL=%i")
After executing this command, the variable "SSDMODEL" should contain the model and serial number of the disk drive with index 0.
原文地址: https://www.cveoy.top/t/topic/i7db 著作权归作者所有。请勿转载和采集!