-
Oct 21st, 2017, 12:18 PM
#1
Thread Starter
Hyperactive Member
Numero of processor
Hello VBForums
Hello every one
Gentelmans
How to make for get the numero of processor for my computer
Thank you in advance for help
Cordially
MADA
-
Oct 21st, 2017, 12:57 PM
#2
Re: Numero of processor
What "numero" are you talking about? The processor make and model? Why would you even need this?
-
Oct 21st, 2017, 01:34 PM
#3
Thread Starter
Hyperactive Member
Re: Numero of processor
Hiii dilettante
I just thought for learn of putting for protect my simple program EXE.
Cordially
MADA
-
Oct 21st, 2017, 01:34 PM
#4
Re: Numero of processor
Simple
Code:
MsgBox Environ$("NUMBER_OF_PROCESSORS")
Advanced http://vbnet.mvps.org/index.html?cod..._processor.htm
-
Oct 21st, 2017, 01:38 PM
#5
Re: Numero of processor
Originally Posted by MADA BLACK
I just thought for learn of putting for protect my simple program EXE.
How can knowing number of processors help protect a program?
-
Oct 21st, 2017, 01:46 PM
#6
-
Oct 21st, 2017, 01:52 PM
#7
Thread Starter
Hyperactive Member
Re: Numero of processor
4x2y
Thank you very much for help
But with this code i have a number (2) .......!!!!!????
Cordially
MADA
-
Oct 21st, 2017, 02:01 PM
#8
Re: Numero of processor
Originally Posted by MADA BLACK
4x2y
Thank you very much for help
But with this code i have a number (2) .......!!!!!????
Cordially
MADA
Do you mean number of processors (cores) or CPU serial number?
-
Oct 21st, 2017, 02:02 PM
#9
Re: Numero of processor
Hi Mada,
try this..
add a Listbox and a commandbutton.
Code:
Private Sub Command1_Click()
GetCPUData
End Sub
Sub GetCPUData(Optional ByVal strComputerName As String = ".")
' Fehlerbehandlung
On Error Resume Next
Dim strSQL As String
Dim strWMI As String
Dim oWMI As Object
Dim objItem As Object
Dim lngOldMouse As Long
'Mousecursor setzen (es ist eine längere Abfrage)
lngOldMouse = Me.MousePointer
Me.MousePointer = vbHourglass
'Abfragen festlegen
strSQL = "Select * from Win32_Processor"
strWMI = "winmgmts:\\" & strComputerName & "\root\cimv2"
'Abfrage durchführen
Set oWMI = GetObject(strWMI).ExecQuery(strSQL)
'Alle zurückgegebenen Objekte durchlaufen
For Each objItem In oWMI
'Gerätebezeichnung der CPU ausgeben
List1.AddItem "Prozessor : " & objItem.DeviceID
'Name der CPU ausgeben
List1.AddItem " Name : " & objItem.Name
'maximale Taktfrequenz der CPU ausgeben
List1.AddItem " Takt (MHz): " & objItem.MaxClockSpeed
'Prozessor-ID der CPU ausgeben
List1.AddItem " CPU ID : " & objItem.ProcessorId
Next
' Mousecoursor zurücksetzen
MousePointer = lngOldMouse
End Sub
regards
Chris
to hunt a species to extinction is not logical !
since 2010 the number of Tigers are rising again in 2016 - 3900 were counted. with Baby Callas it's 3901, my wife and I had 2-3 months the privilege of raising a Baby Tiger.
-
Oct 21st, 2017, 03:52 PM
#10
Thread Starter
Hyperactive Member
Re: Numero of processor
Thank you very much dilettante for best link
Cordially
MADA
-
Oct 21st, 2017, 03:54 PM
#11
Thread Starter
Hyperactive Member
Re: Numero of processor
Thank you ChrisE
Thank you for help
Exactly
This is what i want .. thank you a lot
A last question please
if I formate my computer and i change for example version windows
does this processor number change?
Cordially
MADA
-
Oct 21st, 2017, 03:59 PM
#12
Re: Numero of processor
Can't see how. The processors are hardware, not software-related. The only way that could change is that whatever service/function you are calling to get the count can no longer determine the number of processors.
-
Oct 21st, 2017, 04:08 PM
#13
Re: Numero of processor
Don't rely on the admin scripting tool WMI. The WMI Service can be missing, stopped, or secured against standard user access. It is not meant to be used within application code.
-
Oct 21st, 2017, 04:43 PM
#14
Thread Starter
Hyperactive Member
Re: Numero of processor
Lavolpe
Dilittante
Thank you very very much
In your opinion masters .. how to make a simple protection of program exe " simple and basic protection "
Cordially
MADA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|