473,231 Members | 1,878 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

How to make visual basic return system information?

for a project, im making a system that will tell users what software their computer can use when compared with a list of known software specifications, but id like to know if VB6 can be coded to shows the user what their processor is, its clock speed, the amount of RAM, and avaliable hard drive space etc. currently i am working around the problem by using a command button to launch Dxdiag and letting the user input specs manually
Nov 2 '10 #1
2 1758
'With this script and the WScript host, you can query
'information about a user's PC. Wrap this code in
'a function and work from user input by iterating the
'wscript.arguments collection. For more info about a
'computer, query the win32_ComputerSystem.


''force explicit variable declaration
option explicit

''declare variables
dim compStr, wmiObj, settingsColl, procObj

''set the computer to query
compStr= "."

''instantiate the WMI object
set wmiObj = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\" & compStr & "\root\cimv2")

''query the computer's processor info
set settingsColl= wmiObj.ExecQuery ("SELECT * FROM Win32_Processor")

''iterate the processors to display info
for each procObj in settingsColl
Wscript.Echo "System Type: " & procObj.Architecture
Wscript.Echo "Processor: " & procObj.Description
next
Nov 4 '10 #2
thanks for the help, but its saying something about, Wscript nto being declaired? im not sure what to declair it as in this case
Nov 9 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

15
by: BlackFireNova | last post by:
I am learning Visual Basic as I go, and many times I run across a command I would like to reference. Can anyone tell me how I can open the VBA Help Reference portion of Access directly, without...
1
by: Zvonko Tusek | last post by:
Is there a way to use access database on web host (I have a web hosting account) in visual basic. I want to make Visual basic client applications that connect to internet and work with access...
5
by: john | last post by:
I searched http://www.sellsbrothers.com. and could not find anything about this subject. How do I make C# User Controls Visible to Visual Basic 6.0 Applications? Thanks, John
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
4
by: Virox | last post by:
I don't know how to make visual basic press a key using code, can someone help me?!
1
by: =?Utf-8?B?QWpheSBTaGFyZGE=?= | last post by:
Is there any way by which we can make visual basic C++ compatible with WIndows vista
6
mariusseven
by: mariusseven | last post by:
I need ideas of how to make visual basic programs perform faster without compromising its details and efficiency.
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.