Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 04-06-2009
Member
 
Join Date: Mar 2009
Posts: 60
Vbscript to change mac address

I am looking for VB program to change mac address. I know how to change the mac address in windows xp system but is there any way to change mac address in windows 98? Any recommendations and suggestions are appreciated.
Reply With Quote
  #2  
Old 04-06-2009
Member
 
Join Date: Apr 2008
Posts: 3,518
Re: Vbscript to change mac address

1. Goto Start->Run, type "Winipcfg"

2. Select your ethernet card and record the MAC address

3. Goto Start->Run, type "regedit" to bring up registry editor.

4. Locate "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\Net".
It should have subkeys like "0000", "0001", "0002" and so on.

5. Click on each subkey that starts with "0000" and determine your Ethernet
card by looking at "DriverDesc" key. If it did not match, then goto "0001",
"0002" and so on...

6. Once you got the right NIC card,

1. Click on dropdown menu Edit->New->String Value.
2. Name the new string "networkaddress" and click OK.
3. Double-click on the new "networkaddress" string and you will be
prompted for "Value data"
4. Enter the new MAC address you want to assign. The MAC address you
enter should be a 12 digit number with NO "-", i.e. "00B094ECD861".

source : klcconsulting.net
Reply With Quote
  #3  
Old 04-06-2009
Member
 
Join Date: Dec 2008
Posts: 177
Re: Vbscript to change mac address

Code:
Function Findmac( sDevice ) 
Dim Npc 
Dim OpenItem 
Dim Getresult

Getresult = "" 

On Error Resume Next 
Set oWMI = GetObject("winmgmts:\\" & sDevice & "\root\cimv2") 
If Err.Number = 0 Then 
Set Npc = oWMI.ExecQuery( "Select * from 
Win32_NetworkAdapterConfiguration" ) 
For Each OpenItem in Npc
'WScript.echo OpenItem.Name 
Getresult = Getresult & oItem.Caption & "~" & oItem.MACAddress & "^" 
Next 

Getresult = Mid( Getresult, 1, Len(Getresult ) - 1 ) 
End If 
Err.Clear 
On Error Goto 0 

findmac = Getresult
End Function 

sPC = "PC003333" 
WScript.StdOut.Write "GetMac of " & sPC & ": " 
WSCript.Echo Findmac( sPC )
Reply With Quote
  #4  
Old 04-06-2009
Member
 
Join Date: Sep 2005
Posts: 2,321
Re: Vbscript to change mac address

Check this thread for more information on how to change mac address :
How To Change a MAC Address?
Why can't I change this MAC address under Vista?
Mac Address Book
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Vbscript to change mac address"
Thread Thread Starter Forum Replies Last Post
Change ip address from 10.0.2.14 to 192.168.X.X dalsandhu Networking & Security 3 09-10-2009 03:06 PM
change IP address iRounak Networking & Security 6 25-08-2009 08:29 AM
How to Change Permission in VBScript Quattro Software Development 3 09-06-2009 08:44 AM
How to change IE proxy using VBscript Harshini Software Development 2 27-04-2009 11:55 PM
How to change WAN IP address? Rugby Networking & Security 3 13-01-2009 06:33 PM


All times are GMT +5.5. The time now is 06:24 AM.