Hey all :),
Does anyone know of a way to retrieve the fllowing:
HDD size
RAM Total Size
OS and Serice Pack
CPU Speed
On every windows OS!
Any help would be appreciated.
thanks
b :)
Printable View
Hey all :),
Does anyone know of a way to retrieve the fllowing:
HDD size
RAM Total Size
OS and Serice Pack
CPU Speed
On every windows OS!
Any help would be appreciated.
thanks
b :)
Try looking up "WMI" at http://www.mvps.org for samples on these.
I'm not sure how, but I remember in VB6 that if you added frmAbout Form, it contained a section 'System Info'.
Take a look at the code behind it.
Hope this helps
MartinLG
Martin, this calls on the windows system information program - it's a bit like the shell command calling on another program to get this information so thiswon't really help this time. :)
Course if he does use that one it'd save him a load of coding ;)
Correct, Alex! :)
You need IS-IT-Legit for that.Quote:
Originally posted by Beacon
Hey all :),
Does anyone know of a way to retrieve the fllowing:
HDD size
RAM Total Size
OS and Serice Pack
CPU Speed
On every windows OS!
Any help would be appreciated.
thanks
b :)
Only €1300 for a site license ;)
I would do but it doesnt compare what i've got listed in my asset register with what it returns!Quote:
Originally posted by plenderj
You need IS-IT-Legit for that.
Only €1300 for a site license ;)
Come on it ppl are lazy!! :p
Thanks alex. I was assuming WMI has to be installed on 98 and NT though!
b :)
The Microsoft SysInfo control provides a great way of gathering system information
James but it doesnt supply this information.
As far as i can gather!
Found this in a search :
A DLL file (moo.dll) with example. Will return your Operating System, Processor, Memory Information, Hard
Drive Information (sample only shows drive C:\) Display Settings and
Network Interface Information.
<Attachment (DLL File) removed by admin due to potential 'badness' :) >
Beacon, I can send you on some source from IS-IT-Legit that will get that info if you want.
All done through VB
I really want to write a program that can do such stuff mind sending me the code plenderj (jamie right?)? can you send it to [email protected] ???? that would be really really nice of you if you did that :D :cool:
btw why is it always that when you ask for something some people just point you to programs thata allready exist and can be downloaded while we want a source or something? :confused: :rolleyes: :rolleyes:
Ultimasnake : People are here to offer suggestions to your problems. Some may provide source code, other dll or ocx, while others may recommend applications. It's all help...;)
Thats true , but shouldnt vb related stuff be vb source related? any program can be written in any language.. but i understand it, just think it is rather anoying sometimes.. when i ask for a way to get the computers name people say things like : download computer info , it's just 800 mb and costs only $1.000.000 .. :rolleyes: ... neway... i understand :P
Hye Guy's
To clarify i've been contacting with Jamie for months now so his offer was legit (pun intended) it was a kind of jest! :)
Jamie:
ONE BIG THING!
IS-IT-Legit NEEDS TO plug into or run with A.D do this using ADSI!
b :)
I've just been getting into this myself http://216.26.168.92/vbsquare/demos/...Admin.cls.html
or "Windows NT/2000 ADSI Scripting for System Administration" by Macmillan Technical Publishing ISBN: 1-57870-219-4 is a fantastic resource for ADSI scripting with vb! ;)
I use this informations in a application. I downloaded from API.COM the code for it.
nice greetings
Franky
(Still on the way to Bali? Maybe Thailand is better now ....)
I think you can use SysInfo to get OS and service pack, Um, the code below is to get RAM, available RAM, and Vram and such:'
(for this example you need to have label1)
VB Code:
Option Explicit Private Declare Sub GlobalMemoryStatus Lib "kernel32" (lpBuffer As MEMORYSTATUS) Private Type MEMORYSTATUS dwLength As Long dwMemoryLoad As Long dwTotalPhys As Long dwAvailPhys As Long dwTotalPageFile As Long dwAvailPageFile As Long dwTotalVirtual As Long dwAvailVirtual As Long End Type Private memInfo As MEMORYSTATUS Private Sub Form_Load() Call GlobalMemoryStatus(memInfo) memInfo.dwLength = Len(memInfo) Label1 = Int((memInfo.dwTotalPhys / 1024) / 1024) & " MB of RAM" End Sub
I have used this (got most of it from thsi board - thanks guys)
Creat a form, call it frmmain, ad a text box - call it text1, and creat a command button - call it command 1.
Past this into the form and you shoulf be good to go..
Hopefully it will provide all the info you need..
Rudy
Option Explicit
Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Private ComputerName As String
Private Sub Command1_Click()
Dim WMI
Dim wmiWin32Objects
Dim wmiWin32Object
frmMain.MousePointer = vbHourglass
frmMain.Command1.MousePointer = vbNoDrop
frmMain.Text1.Text = "Connecting....."
DoEvents
On Error GoTo CanNotConnect
Set WMI = GetObject("WinMgmts://" & ComputerName)
Set wmiWin32Objects = WMI.InstancesOf("Win32_Processor")
With wmiWin32Object
For Each wmiWin32Object In wmiWin32Objects
DoEvents
frmMain.Text1.Text = "AddressWidth: " & .AddressWidth
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Architecture: " & .Architecture
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Availability: " & .Availability
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Caption: " & .Caption
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ConfigManagerErrorCode: " & .ConfigManagerErrorCode
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ConfigManagerUserConfig: " & .ConfigManagerUserConfig
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "CpuStatus: " & .CpuStatus
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "CreationClassName: " & .CreationClassName
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "CurrentClockSpeed: " & .CurrentClockSpeed
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "CurrentVoltage: " & .CurrentVoltage
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "DataWidth: " & .DataWidth
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Description: " & .Description
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "DeviceID: " & .DeviceID
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ErrorCleared: " & .ErrorCleared
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ErrorDescription: " & .ErrorDescription
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ExtClock: " & .ExtClock
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Family: " & .Family
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "InstallDate: " & .InstallDate
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "L2CacheSize: " & .L2CacheSize
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "L2CacheSpeed: " & .L2CacheSpeed
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "LastErrorCode: " & .LastErrorCode
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Level: " & .Level
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "LoadPercentage: " & .LoadPercentage
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Manufacturer: " & .Manufacturer
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "MaxClockSpeed: " & .MaxClockSpeed
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Name: " & .Name
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "OtherFamilyDescription: " & .OtherFamilyDescription
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "PNPDeviceID: " & .PNPDeviceID
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "PowerManagementCapabilities: " & .PowerManagementCapabilities
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "PowerManagementSupported: " & .PowerManagementSupported
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ProcessorId: " & .ProcessorId
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "ProcessorType: " & .ProcessorType
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Revision: " & .Revision
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Role: " & .Role
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "SocketDesignation: " & .SocketDesignation
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Status: " & .Status
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "StatusInfo: " & .StatusInfo
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Stepping: " & .Stepping
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "SystemCreationClassName: " & .SystemCreationClassName
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "SystemName: " & .SystemName
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "UniqueId: " & .UniqueId
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "UpgradeMethod: " & .UpgradeMethod
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Version: " & .Version
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "VoltageCaps: " & .VoltageCaps
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Description: " & .Description
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "Manufacturer: " & .Manufacturer
frmMain.Text1.Text = frmMain.Text1.Text & vbNewLine & "MaxClockSpeed: " & .MaxClockSpeed
DoEvents
Next
End With
frmMain.MousePointer = vbDefault
frmMain.Command1.MousePointer = vbDefault
DoEvents
Exit Sub
CanNotConnect:
If Err.Number = 462 Then
Call MsgBox("Unable to connect to " & ComputerName & vbNewLine & "Make sure you spelled the PC Name correctly with proper casing!", vbOKOnly + vbCritical, "No Connection")
Err.Number = 0
frmMain.MousePointer = vbDefault
frmMain.Command1.MousePointer = vbDefault
DoEvents
Else
Call MsgBox("Unable to connect to that PC" & vbNewLine & "Error # " & Err.Number & " - " & Err.Description, vbOKOnly + vbCritical, "No Connection")
Err.Number = 0
frmMain.MousePointer = vbDefault
frmMain.Command1.MousePointer = vbDefault
DoEvents
End If
End Sub
Private Sub Form_Load()
Dim NameSize As Long
Dim X As Long
Dim MachineName As String
MachineName = Space$(16)
NameSize = Len(MachineName)
X = GetComputerName(MachineName, NameSize)
ComputerName = Trim(MachineName)
frmMain.Caption = frmMain.Caption & " - " & ComputerName
DoEvents
End Sub