Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
Read out windows drive infos like hard disk serial...
Author:
euroarmy leader group
Website:
http://www.euroarmy.org
Submitted:
11/8/2000
Version:
VB5
Compatibility:
VB5, VB6
Category:
File Manipulation
Views:
14742
Read out windows drive infos like hard disk serial number file system etc... check it out!
Declarations:
'none
Code:
'You need to have reference to Microsoft Scripting Runtime first. 'Put a ListBox on your form and run the code. 'FileSystecmObject is very powerful in dealing with file system. 'See VB help for more detailed info. 'GERMAN: das vb project muss auf Microsoft Scripting 'Runtime verweisen Private Sub cmdInfo_Click() ' Dim fldr As Folder Dim fso As New FileSystemObject Dim drv As Drive ' Set drv = fso.GetDrive(fso.GetDriveName("C:")) ' With List1 .AddItem "Available space: " & FormatNumber(drv.AvailableSpace / 1024, 0) & " BK" .AddItem "Drive letter: " & drv.DriveLetter .AddItem "Drive type: " & drv.DriveType .AddItem "Drive file system: " & drv.FileSystem .AddItem "Drive free space: " & FormatNumber(drv.FreeSpace / 1024, 0) & " BK" .AddItem "Drive is ready: " & drv.IsReady .AddItem "Drive path: " & drv.Path .AddItem "Root folder: " & drv.RootFolder .AddItem "Serial number: " & drv.SerialNumber .AddItem "Share name: " & drv.ShareName .AddItem "Total size: " & FormatNumber(drv.TotalSize / 1024, 0) & " BK" .AddItem "Volume name : " & drv.VolumeName End With ' End Sub
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2023 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement