DriveGetSerial

首页  后退  前进

DriveGetSerial
down2

DriveGetSerial

返回驱动器序列号.

 

DriveGetSerial ( "path" )

参数

path

驱动器的路径.

返回值

成功:

返回驱动器序列号字符串.

失败:

设置 @error 为 1.

备注

返回的驱动器序列号不是硬件序列号, 它是驱动器的 Windows 卷 ID.

 

函数示例

#include <MsgBoxConstants.au3>
Local $sSerial = DriveGetSerial(@HomeDrive & "\") ; Find the serial number of the home drive, generally this is the C:\drive.
MsgBox($MB_SYSTEMMODAL, "", "Serial Number: " & $sSerial)

----------------------------------------

 

该函数可以通过命令 exect 调用

参见:

DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetType, DriveSetLabel, DriveSpaceFree, DriveSpaceTotal, DriveStatus

例子
copy

exect=$var_sseral=DriveGetSerial('C:\')||_ViewValues('$var_sseral') ;; 确定系统盘的序列号

up2

tcimage © Аверин Андрей для Total Commander Image Averin-And@yandex.ru