473,394 Members | 1,806 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,394 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 1761
'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.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.