Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The usage of the VBS property SerialNumber

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly explains "the usage of VBS attribute SerialNumber". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the usage of VBS attribute SerialNumber".

Returns a decimal serial number that uniquely identifies a disk volume.

Object.SerialNumber

Object should be the name of the Drive object.

Description

You can use the SerialNumber property to ensure that the correct disk is inserted in the removable media drive.

The following code illustrates how to use the SerialNumber property:

Function ShowDriveInfo (drvpath) Dim fso, d, s T Set fso = CreateObject ("Scripting.FileSystemObject") Set d = fso.GetDrive (fso.GetDriveName (fso.GetAbsolutePathName (drvpath) Select Case d.DriveType Case 0: t = "unknown" Case 1: t = "removable" Case 2: t = "fixed" Case 3: t = "network" Case 4: t = "CD-ROM" Case 5: t = "RAM disk "End Select s =" Drive "& d.DriveLetter &":-"& t s = s &"

"&" Serial number: & d.SerialNumberShowDriveInfo = sEnd Function Thank you for your reading. This is the content of "the usage of VBS attribute SerialNumber". After the study of this article, I believe you have a deeper understanding of the use of VBS attribute SerialNumber, and the specific use needs to be verified in practice. Here, the editor will push more articles on related knowledge points, welcome to follow us!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report