Results 1 to 4 of 4

Thread: Vbscript to change mac address

  1. #1
    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.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,522

    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

  3. #3
    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 )

  4. #4
    Join Date
    Sep 2005
    Posts
    2,327

    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

Similar Threads

  1. Change ip address from 10.0.2.14 to 192.168.X.X
    By dalsandhu in forum Networking & Security
    Replies: 3
    Last Post: 09-10-2009, 03:06 PM
  2. change IP address
    By iRounak in forum Networking & Security
    Replies: 6
    Last Post: 25-08-2009, 08:29 AM
  3. How to Change Permission in VBScript
    By Quattro in forum Software Development
    Replies: 3
    Last Post: 09-06-2009, 08:44 AM
  4. How to change IE proxy using VBscript
    By Harshini in forum Software Development
    Replies: 2
    Last Post: 27-04-2009, 11:55 PM
  5. How to change WAN IP address?
    By Rugby in forum Networking & Security
    Replies: 3
    Last Post: 13-01-2009, 06:33 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,869,956.85847 seconds with 16 queries