VBScript to change the Network Adapter Name

Version 1
    Share:|

    Const NETWORK_CONNECTIONS = &H31&

     

     

    Set objShell = CreateObject("Shell.Application")

    Set objFolder = objShell.Namespace(NETWORK_CONNECTIONS)

    Set colNetworkConnectionItems = objFolder.Items

     

     

    For Each objItem in colNetworkConnectionItems

     

      Rename network connection to "XYZ" if current name starts with "ABC"

      If Instr(UCase(objItem.Name), "XYZ") = 1 Then

      objItem.Name = "ABC"

      End If

    Next