|
-
Dec 18th, 2008, 01:21 PM
#1
Thread Starter
Lively Member
Registry Help needed
Hi all i wanted to build a mac address changer tool so what im not understanding 1. how to get every NIC from the registry i now its loocated in here
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\ so how can i get all sub keys from here and read the DriverDesc name
2. how to example select after i get the NIC name i can create a Dword key in that subdirecotry with the name Network Name example
if somone undestand what i want to know please help sorry for my bad english and if possible comment all what you do i would like to learn from it
-
Dec 18th, 2008, 09:22 PM
#2
Re: Registry Help needed
you can not change the mac address as it is hardcoded into the nic
changing the registry setting may just stop it working
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Dec 19th, 2008, 09:00 AM
#3
Thread Starter
Lively Member
Re: Registry Help needed
 Originally Posted by westconn1
you can not change the mac address as it is hardcoded into the nic
changing the registry setting may just stop it working
Yes you can its called Mac Spoffing
-
Dec 20th, 2008, 01:41 AM
#4
Re: Registry Help needed
here is a scripting method to read all values (driverdesc) from the subkeys of the key you are interested in
vb Code:
Const HKEY_LOCAL_MACHINE = &H80000002 Set oreg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") strkeypath = "SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}" oreg.Enumkey HKEY_LOCAL_MACHINE, strkeypath, arrSubKeys, arr For Each subkey In arrSubKeys oreg.enumvalues HKEY_LOCAL_MACHINE, strkeypath & "\" & subkey, arrvals, aaa If Not IsNull(arrvals) Then For j = 0 To UBound(arrvals) If arrvals(j) = "DriverDesc" Then oreg.getstringvalue HKEY_LOCAL_MACHINE, strkeypath & "\" & subkey, arrvals(j), myvalue MsgBox myvalue Exit For End If Next End If Next MsgBox "finish"
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
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
|