I need a script able to obtain hard disk size using VB6.

Asked By 30 points N/A Posted on -
qa-featured

Hello! I am new into Visual Basic and I would like to develop a script that is able to obtain hard disk size using VB6 application. This should work with all the internal and external devices whenever they are attached. If possible it should work with FAT32 file types as well. Thanks a bunch.

SHARE
Best Answer by Darrel R Gonzale
Best Answer
Best Answer
Answered By 0 points N/A #169202

I need a script able to obtain hard disk size using VB6.

qa-featured

Hello Richard A Coutu,

I think you need some WIN32 programming skills. You can learn these skills by studding the win32 Programming. WIN32 programming provides you solutions for how to write script to connect with internal and external devices. I can tell you some interesting websites that will guide you to the rest of your development. The first website is the most popular website of Microsoft where you can learn these tools. I am giving you a link for the website that contains a program for your execution. 

Link: How To Determine the Type of Drive Using Win32

Darrel R Gonzale

Answered By 65 points N/A #169203

I need a script able to obtain hard disk size using VB6.

qa-featured

Hi Richard,

If you will only be the one to use it, you could use WMI (Windows Management Instrumentation).

Private Sub Commandl_Click(1)

 Set WM=Getobject(“Winmgmts:”)

 For Each DSK In WMI.ExecQuery(“Select DeviceID,Size, FreeSpace from

    Win32_LogicalDisk” , , 48)

         Debug. Print DSK. DeviceID, DSK.FreeSpace

       Next

     End Sub

 

I hope this solves your problem.

 

Related Questions