Discussion Locked

VB 6 - gathering hardware information

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to write a VB 6 application that collects the following information from a PC on the network (PC's are running Windows 95 with the latest updates):

1 - Total Hard Disk Space
2 - Available Hard Disk space or used

I would then liketo output this information to a file that contains the network user's name (logging into both NetWare 4.11 and NT 4)

8 replies

by mrcode925

There are two API functions that you will need to call from VB. Look these up in MSDN for proper usage. I can help if you have problems.

GetUserName()
GetDiskFreeSpace()

As for the Netware UserName, here is an article on getting it, but I do not use Netware and don't know if the article is of any use to you.

http://www.compguy.com/cwtip01.htm

by mohammad_m_saggaf

The functions you see in the 1st answer are used to get information about the computer that they run on not a remote PC. I don't think there is any function can give you such information about another pc - personally I consider it a security hole.
But if you want to gather information about pc throug the network you can make a small client program that run on the PCs that you want to get their info. and that program send the information to the main application throug the winsock.
Then the main application could do anything with them.

I hope I helped.
Good luck :-).

by tjc

Your program would have to find the names of the computers on the network and then map to them and then do the vb functions mentioned above.

Problems with this is:
1. you need access to each hard drive so you can then read the drives (bad security move) by mapping them though code.
2. reading the current names of the computers on- I dont' have the functions you need for that.

by tjc

I fogot that on of the fuctions was mentioned for "getusername()" - so all you need is how to map the drives though code.

This discussion is closed to new replies.