| 
 | 
 本帖最后由 pda8888 于 2024-8-24 05:45 编辑  
 
0.9.7 的版本下,执行: 
nwinfo_x86 --disk --format=json,得到: 
- {
 
 -   "Build Time": "Jun  2 2024 05:50:36",
 
 -   "libnw": "v0.9.7.0",
 
 -   "MSVC Version": "193933523",
 
 -   "NT Version": "10.0.22631",
 
 -   "Driver": "NOT FOUND",
 
 -   "Language ID": "2052",
 
 -   "libcpuid": "0.6.5",
 
 -   "CrystalDiskInfo": "9.2.1",
 
 -   "PCI ID": "2024.05.31",
 
 -   "USB ID": "2024.03.18",
 
 -   "PNP ID": "2024.06.02",
 
 -   "JEP106 ID": "2024.05.02",
 
 -   "Disks": [
 
 -     {
 
 -       "Path": "\\\\.\\PhysicalDrive0",
 
 -       "HWID": "SCSI\\DISK&VEN_NVME&PROD_XPG_GAMMIX_S70_B\\5&B27292B&0&000000",
 
 -       "HW Name": "XPG GAMMIX S70 BLADE",
 
 -       "Product ID": "XPG GAMMIX S70 BLADE",
 
 -       "Product Rev": "3.2.J.F0",
 
 -       "Serial Number": "2N4429AAK1JH",
 
 -       "Serial Number (Raw)": "0000_0000_0000_0000_707C_185E_6481_A513.",
 
 -       "Type": "NVMe",
 
 -       "Removable": "No",
 
 -       "Size": 1024209543168,
 
 -       "Partition Table": "GPT",
 
 -       "GPT GUID": "{25E29325-84C9-0445-A864-002137F438DB}",
 
 -       "SSD": "Yes",
 
 -       "Temperature (C)": 47,
 
 -       "Health Status": "Good (100%)",
 
 -       "Current Transfer Mode": "PCIe 4.0 x4",
 
 -       "Max Transfer Mode": "PCIe 4.0 x4",
 
 -       "Standard": "NVM Express 1.4",
 
 -       "Features": [ "S.M.A.R.T.", "TRIM", "VolatileWriteCache" ],
 
 -       "Total Host Reads": "3281 GB",
 
 -       "Total Host Writes": "2873 GB",
 
 -       "Power On Count": 100,
 
 -       "Power On Time (Hours)": 376,
 
 -       "SMART Format": "RawValues(7)",
 
 -       "SMART 01": "00000000000000 Critical Warning",
 
 -       "SMART 02": "00000000000140 Composite Temperature",
 
 -       "SMART 03": "00000000000064 Available Spare",
 
 -       "SMART 04": "00000000000019 Available Spare Threshold",
 
 -       "SMART 05": "00000000000000 Percentage Used",
 
 -       "SMART 06": "00000000690369 Data Units Read",
 
 -       "SMART 07": "000000005BF477 Data Units Written",
 
 -       "SMART 08": "00000002AE23D5 Host Read Commands",
 
 -       "SMART 09": "00000002CC18CA Host Write Commands",
 
 -       "SMART 0A": "00000000000000 Controller Busy Time",
 
 -       "SMART 0B": "00000000000064 Power Cycles",
 
 -       "SMART 0C": "00000000000178 Power On Hours",
 
 -       "SMART 0D": "00000000000009 Unsafe Shutdowns",
 
 -       "SMART 0E": "00000000000000 Media and Data Integrity Errors",
 
 -       "SMART 0F": "00000000000000 Number of Error Information Log Entries",
 
 -       "Volumes": [
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume4",
 
 -           "Volume GUID": "\\\\?\\Volume{a267120e-e9d5-4500-b22b-2534acff4302}",
 
 -           "Starting LBA": 2541568,
 
 -           "Partition Number": 4,
 
 -           "Partition Type": "{EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}",
 
 -           "Partition ID": "{A267120E-E9D5-4500-B22B-2534ACFF4302}",
 
 -           "Partition Flag": "DATA",
 
 -           "Label": "Win 11 Pro x64",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 989311062016,
 
 -           "Total Space": 1021890785280,
 
 -           "Usage": "3.19%",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "C:\\"
 
 -             }
 
 -           ]
 
 -         },
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume5",
 
 -           "Volume GUID": "\\\\?\\Volume{3ac84176-a7e1-4ef1-8457-621005b7699b}",
 
 -           "Starting LBA": 1998422016,
 
 -           "Partition Number": 5,
 
 -           "Partition Type": "{DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}",
 
 -           "Partition ID": "{3AC84176-A7E1-4EF1-8457-621005B7699B}",
 
 -           "Partition Flag": "WINRE",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 65425408,
 
 -           "Total Space": 1015017472,
 
 -           "Usage": "93.55%",
 
 -           "Volume Path Names": []
 
 -         },
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume1",
 
 -           "Volume GUID": "\\\\?\\Volume{4546f7a3-0f8f-4a84-9a53-4b8692d9a2af}",
 
 -           "Starting LBA": 2048,
 
 -           "Partition Number": 1,
 
 -           "Partition Type": "{C12A7328-F81F-11D2-BA4B-00A0C93EC93B}",
 
 -           "Partition ID": "{4546F7A3-0F8F-4A84-9A53-4B8692D9A2AF}",
 
 -           "Partition Flag": "ESP",
 
 -           "Label": "EFI_BOOT",
 
 -           "Filesystem": "FAT32",
 
 -           "Free Space": 176035840,
 
 -           "Total Space": 205520896,
 
 -           "Usage": "14.35%",
 
 -           "Volume Path Names": []
 
 -         }
 
 -       ]
 
 -     },
 
 -     {
 
 -       "Path": "\\\\.\\PhysicalDrive1",
 
 -       "HWID": "SCSI\\DISK&VEN_NVME&PROD_PREDATOR_SSD_GM7\\5&EF2A01D&0&000000",
 
 -       "HW Name": "Predator SSD GM7000 2TB",
 
 -       "Product ID": "Predator SSD GM7000 2TB",
 
 -       "Product Rev": "3.A.J.CR",
 
 -       "Serial Number": "PSBG54050404921",
 
 -       "Serial Number (Raw)": "0000_0000_0000_0000_A843_9740_5040_4921.",
 
 -       "Type": "NVMe",
 
 -       "Removable": "No",
 
 -       "Size": 2048408248320,
 
 -       "Partition Table": "GPT",
 
 -       "GPT GUID": "{08B3EE24-4D63-F74D-9870-AE0EDFB1CAD1}",
 
 -       "SSD": "Yes",
 
 -       "Temperature (C)": 48,
 
 -       "Health Status": "Good (100%)",
 
 -       "Current Transfer Mode": "PCIe 4.0 x4",
 
 -       "Max Transfer Mode": "PCIe 4.0 x4",
 
 -       "Standard": "NVM Express 1.4",
 
 -       "Features": [ "S.M.A.R.T.", "TRIM", "VolatileWriteCache" ],
 
 -       "Total Host Reads": "38 GB",
 
 -       "Total Host Writes": "363 GB",
 
 -       "Power On Count": 6,
 
 -       "Power On Time (Hours)": 8,
 
 -       "SMART Format": "RawValues(7)",
 
 -       "SMART 01": "00000000000000 Critical Warning",
 
 -       "SMART 02": "00000000000141 Composite Temperature",
 
 -       "SMART 03": "00000000000064 Available Spare",
 
 -       "SMART 04": "00000000000019 Available Spare Threshold",
 
 -       "SMART 05": "00000000000000 Percentage Used",
 
 -       "SMART 06": "00000000013E8F Data Units Read",
 
 -       "SMART 07": "000000000B9EAB Data Units Written",
 
 -       "SMART 08": "00000000052152 Host Read Commands",
 
 -       "SMART 09": "0000000006B99B Host Write Commands",
 
 -       "SMART 0A": "00000000000000 Controller Busy Time",
 
 -       "SMART 0B": "00000000000006 Power Cycles",
 
 -       "SMART 0C": "00000000000008 Power On Hours",
 
 -       "SMART 0D": "00000000000003 Unsafe Shutdowns",
 
 -       "SMART 0E": "00000000000000 Media and Data Integrity Errors",
 
 -       "SMART 0F": "00000000000000 Number of Error Information Log Entries",
 
 -       "Volumes": [
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume7",
 
 -           "Volume GUID": "\\\\?\\Volume{a3dbfbbe-511c-4e41-a03c-107b2f813d00}",
 
 -           "Starting LBA": 32768,
 
 -           "Partition Number": 2,
 
 -           "Partition Type": "{EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}",
 
 -           "Partition ID": "{A3DBFBBE-511C-4E41-A03C-107B2F813D00}",
 
 -           "Partition Flag": "DATA",
 
 -           "Label": "文档磁盘",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 1051460829184,
 
 -           "Total Space": 1051850698752,
 
 -           "Usage": "0.04%",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "D:\\"
 
 -             }
 
 -           ]
 
 -         },
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume8",
 
 -           "Volume GUID": "\\\\?\\Volume{7751f816-9ab3-4dc1-afd1-a3a2e8c48817}",
 
 -           "Starting LBA": 2054428672,
 
 -           "Partition Number": 3,
 
 -           "Partition Type": "{EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}",
 
 -           "Partition ID": "{7751F816-9AB3-4DC1-AFD1-A3A2E8C48817}",
 
 -           "Partition Flag": "DATA",
 
 -           "Label": "软件磁盘",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 996388065280,
 
 -           "Total Space": 996539363328,
 
 -           "Usage": "0.02%",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "E:\\"
 
 -             }
 
 -           ]
 
 -         }
 
 -       ]
 
 -     },
 
 -     {
 
 -       "Path": "\\\\.\\PhysicalDrive2",
 
 -       "HWID": "USBSTOR\\DISK&VEN_USBLCD&PROD_USB_PRC_SYSTEM&REV_\\7&2B772394&0",
 
 -       "HW Name": "USBLCD USB PRC System USB Device",
 
 -       "Vendor ID": "USBLCD",
 
 -       "Product ID": "USB PRC System",
 
 -       "Serial Number": "",
 
 -       "Serial Number (Raw)": "",
 
 -       "Type": "USB",
 
 -       "Removable": "Yes",
 
 -       "Size": 0,
 
 -       "Partition Table": "MBR",
 
 -       "MBR Signature": "00 00 00 00",
 
 -       "Volumes": [
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume9",
 
 -           "Volume GUID": "\\\\?\\Volume{8880b57b-612e-11ef-b9fb-806e6f6e6963}",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "U:\\"
 
 -             }
 
 -           ]
 
 -         }
 
 -       ]
 
 -     }
 
 -   ]
 
 - }
 
  复制代码 
V1.0.1 的版本下,执行相同命令,得到: 
- {
 
 -   "Build Time": "Aug 20 2024 11:53:03",
 
 -   "libnw": "v1.0.1.1",
 
 -   "MSVC Version": "194033813",
 
 -   "NT Version": "10.0.22631",
 
 -   "Driver": "NOT FOUND",
 
 -   "Language ID": "2052",
 
 -   "libcpuid": "0.6.5",
 
 -   "CrystalDiskInfo": "9.3.2",
 
 -   "PCI ID": "2024.06.23",
 
 -   "USB ID": "2024.07.04",
 
 -   "PNP ID": "2024.08.20",
 
 -   "JEP106 ID": "2024.05.02",
 
 -   "Disks": [
 
 -     {
 
 -       "Path": "\\\\.\\PhysicalDrive0",
 
 -       "HWID": "SCSI\\DISK&VEN_NVME&PROD_XPG_GAMMIX_S70_B\\5&B27292B&0&000000",
 
 -       "HW Name": "XPG GAMMIX S70 BLADE",
 
 -       "Product ID": "XPG GAMMIX S70 BLADE",
 
 -       "Product Rev": "3.2.J.F0",
 
 -       "Serial Number": "2N4429AAK1JH",
 
 -       "Serial Number (Raw)": "0000_0000_0000_0000_707C_185E_6481_A513.",
 
 -       "Type": "NVMe",
 
 -       "Removable": "No",
 
 -       "Size": 1024209543168,
 
 -       "Partition Table": "GPT",
 
 -       "GPT GUID": "{25E29325-84C9-0445-A864-002137F438DB}",
 
 -       "SSD": "Yes",
 
 -       "Temperature (C)": 45,
 
 -       "Health Status": "Good (100%)",
 
 -       "Current Transfer Mode": "PCIe 4.0 x4",
 
 -       "Max Transfer Mode": "PCIe 4.0 x4",
 
 -       "Standard": "NVM Express 1.4",
 
 -       "Features": [ "S.M.A.R.T.", "TRIM", "VolatileWriteCache" ],
 
 -       "Total Host Reads": "3281 GB",
 
 -       "Total Host Writes": "2873 GB",
 
 -       "Power On Count": 100,
 
 -       "Power On Time (Hours)": 376,
 
 -       "SMART Format": "RawValues(7)",
 
 -       "SMART 01": "00000000000000 Critical Warning",
 
 -       "SMART 02": "0000000000013E Composite Temperature",
 
 -       "SMART 03": "00000000000064 Available Spare",
 
 -       "SMART 04": "00000000000019 Available Spare Threshold",
 
 -       "SMART 05": "00000000000000 Percentage Used",
 
 -       "SMART 06": "0000000069036E Data Units Read",
 
 -       "SMART 07": "000000005BF487 Data Units Written",
 
 -       "SMART 08": "00000002AE2427 Host Read Commands",
 
 -       "SMART 09": "00000002CC1B15 Host Write Commands",
 
 -       "SMART 0A": "00000000000000 Controller Busy Time",
 
 -       "SMART 0B": "00000000000064 Power Cycles",
 
 -       "SMART 0C": "00000000000178 Power On Hours",
 
 -       "SMART 0D": "00000000000009 Unsafe Shutdowns",
 
 -       "SMART 0E": "00000000000000 Media and Data Integrity Errors",
 
 -       "SMART 0F": "00000000000000 Number of Error Information Log Entries",
 
 -       "Volumes": [
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume4",
 
 -           "Volume GUID": "\\\\?\\Volume{a267120e-e9d5-4500-b22b-2534acff4302}",
 
 -           "Starting LBA": 2541568,
 
 -           "Partition Number": 4,
 
 -           "Partition Type": "{EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}",
 
 -           "Partition ID": "{A267120E-E9D5-4500-B22B-2534ACFF4302}",
 
 -           "Partition Flag": "DATA",
 
 -           "Label": "Win 11 Pro x64",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 989308973056,
 
 -           "Total Space": 1021890785280,
 
 -           "Usage": "3.19%",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "C:\\"
 
 -             }
 
 -           ]
 
 -         },
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume5",
 
 -           "Volume GUID": "\\\\?\\Volume{3ac84176-a7e1-4ef1-8457-621005b7699b}",
 
 -           "Starting LBA": 1998422016,
 
 -           "Partition Number": 5,
 
 -           "Partition Type": "{DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}",
 
 -           "Partition ID": "{3AC84176-A7E1-4EF1-8457-621005B7699B}",
 
 -           "Partition Flag": "WINRE",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 65425408,
 
 -           "Total Space": 1015017472,
 
 -           "Usage": "93.55%",
 
 -           "Volume Path Names": []
 
 -         },
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume1",
 
 -           "Volume GUID": "\\\\?\\Volume{4546f7a3-0f8f-4a84-9a53-4b8692d9a2af}",
 
 -           "Starting LBA": 2048,
 
 -           "Partition Number": 1,
 
 -           "Partition Type": "{C12A7328-F81F-11D2-BA4B-00A0C93EC93B}",
 
 -           "Partition ID": "{4546F7A3-0F8F-4A84-9A53-4B8692D9A2AF}",
 
 -           "Partition Flag": "ESP",
 
 -           "Label": "EFI_BOOT",
 
 -           "Filesystem": "FAT32",
 
 -           "Free Space": 176035840,
 
 -           "Total Space": 205520896,
 
 -           "Usage": "14.35%",
 
 -           "Volume Path Names": []
 
 -         }
 
 -       ]
 
 -     },
 
 -     {
 
 -       "Path": "\\\\.\\PhysicalDrive1",
 
 -       "HWID": "SCSI\\DISK&VEN_NVME&PROD_PREDATOR_SSD_GM7\\5&EF2A01D&0&000000",
 
 -       "HW Name": "Predator SSD GM7000 2TB",
 
 -       "Product ID": "Predator SSD GM7000 2TB",
 
 -       "Product Rev": "3.A.J.CR",
 
 -       "Serial Number": "PSBG54050404921",
 
 -       "Serial Number (Raw)": "0000_0000_0000_0000_A843_9740_5040_4921.",
 
 -       "Type": "NVMe",
 
 -       "Removable": "No",
 
 -       "Size": 2048408248320,
 
 -       "Partition Table": "GPT",
 
 -       "GPT GUID": "{08B3EE24-4D63-F74D-9870-AE0EDFB1CAD1}",
 
 -       "SSD": "Yes",
 
 -       "Temperature (C)": 49,
 
 -       "Health Status": "Good (100%)",
 
 -       "Current Transfer Mode": "PCIe 4.0 x4",
 
 -       "Max Transfer Mode": "PCIe 4.0 x4",
 
 -       "Standard": "NVM Express 1.4",
 
 -       "Features": [ "S.M.A.R.T.", "TRIM", "VolatileWriteCache" ],
 
 -       "Total Host Reads": "38 GB",
 
 -       "Total Host Writes": "363 GB",
 
 -       "Power On Count": 6,
 
 -       "Power On Time (Hours)": 8,
 
 -       "SMART Format": "RawValues(7)",
 
 -       "SMART 01": "00000000000000 Critical Warning",
 
 -       "SMART 02": "00000000000142 Composite Temperature",
 
 -       "SMART 03": "00000000000064 Available Spare",
 
 -       "SMART 04": "00000000000019 Available Spare Threshold",
 
 -       "SMART 05": "00000000000000 Percentage Used",
 
 -       "SMART 06": "00000000013E8F Data Units Read",
 
 -       "SMART 07": "000000000B9EC5 Data Units Written",
 
 -       "SMART 08": "00000000052166 Host Read Commands",
 
 -       "SMART 09": "0000000006BAF5 Host Write Commands",
 
 -       "SMART 0A": "00000000000000 Controller Busy Time",
 
 -       "SMART 0B": "00000000000006 Power Cycles",
 
 -       "SMART 0C": "00000000000008 Power On Hours",
 
 -       "SMART 0D": "00000000000003 Unsafe Shutdowns",
 
 -       "SMART 0E": "00000000000000 Media and Data Integrity Errors",
 
 -       "SMART 0F": "00000000000000 Number of Error Information Log Entries",
 
 -       "Volumes": [
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume7",
 
 -           "Volume GUID": "\\\\?\\Volume{a3dbfbbe-511c-4e41-a03c-107b2f813d00}",
 
 -           "Starting LBA": 32768,
 
 -           "Partition Number": 2,
 
 -           "Partition Type": "{EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}",
 
 -           "Partition ID": "{A3DBFBBE-511C-4E41-A03C-107B2F813D00}",
 
 -           "Partition Flag": "DATA",
 
 -           "Label": "文档磁盘",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 1051449344000,
 
 -           "Total Space": 1051850698752,
 
 -           "Usage": "0.04%",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "D:\\"
 
 -             }
 
 -           ]
 
 -         },
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume8",
 
 -           "Volume GUID": "\\\\?\\Volume{7751f816-9ab3-4dc1-afd1-a3a2e8c48817}",
 
 -           "Starting LBA": 2054428672,
 
 -           "Partition Number": 3,
 
 -           "Partition Type": "{EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}",
 
 -           "Partition ID": "{7751F816-9AB3-4DC1-AFD1-A3A2E8C48817}",
 
 -           "Partition Flag": "DATA",
 
 -           "Label": "软件磁盘",
 
 -           "Filesystem": "NTFS",
 
 -           "Free Space": 996388048896,
 
 -           "Total Space": 996539363328,
 
 -           "Usage": "0.02%",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "E:\\"
 
 -             }
 
 -           ]
 
 -         }
 
 -       ]
 
 -     },
 
 -     {
 
 -       "Path": "\\\\.\\PhysicalDrive2",
 
 -       "HWID": "USBSTOR\\DISK&VEN_USBLCD&PROD_USB_PRC_SYSTEM&REV_\\7&2B772394&0",
 
 -       "HW Name": "USBLCD USB PRC System USB Device",
 
 -       "Vendor ID": "USBLCD",
 
 -       "Product ID": "USB PRC System",
 
 -       "Serial Number": "",
 
 -       "Serial Number (Raw)": "",
 
 -       "Type": "USB",
 
 -       "Removable": "Yes",
 
 -       "Size": 0,
 
 -       "Partition Table": "MBR",
 
 -       "MBR Signature": "00 00 00 00",
 
 -       "Volumes": [
 
 -         {
 
 -           "Path": "\\Device\\HarddiskVolume9",
 
 -           "Volume GUID": "\\\\?\\Volume{8880b57b-612e-11ef-b9fb-806e6f6e6963}",
 
 -           "Volume Path Names": [
 
 -             {
 
 -               "Drive Letter": "U:\\"
 
 -             }
 
 -           ]
 
 -         }
 
 -       ]
 
 -     }
 
 -   ]
 
 - }
 
  复制代码 
在jqplaye.org里面,是这样显示的 
  
问题都在这里:(json文件里面的193、194行) 
-       "Serial Number": "",
 
 -       "Serial Number (Raw)": "",
 
  复制代码 
口里面是0x1f,用二进制查看器是这样的:  
 
 
在jqplay.org执行结果框里报错就是:Error: jq: parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 193, column 26  
 |   
 
 
 
 |