Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Location
    HeaveN
    Posts
    534

    Star Set objNICs Help Needed

    i can set TCP/IP Preferred DNS and Alternate DNS with that code below;


    Code:
    Set objNICs = GetObject("winmgmts://.").InstancesOf("Win32_NetworkAdapterConfiguration")
    For Each objNIC In objNICs
    If objNIC.IPEnabled Then
    objNIC.SetDNSServerSearchOrder Array("4.2.2.1","4.2.2.2")
    End If
    Next
    i need help to restore the default (" . . . "," . . . ")


    i used this 3 code below but i couldnt manage it;

    Code:
    Set objNICs = GetObject("winmgmts://.").InstancesOf("Win32_NetworkAdapterConfiguration")
    For Each objNIC In objNICs
    If objNIC.IPEnabled Then
    objNIC.IPDisable
    End If
    Next
    Code:
    Set objNICs = GetObject("winmgmts://.").InstancesOf("Win32_NetworkAdapterConfiguration")
    For Each objNIC In objNICs
    If objNIC.IPEnabled Then
    objNIC.SetDNSServerSearchOrder Array(" . . . "," . . . ")
    End If
    Next
    Code:
    Set objNICs = GetObject("winmgmts://.").InstancesOf("Win32_NetworkAdapterConfiguration")
    For Each objNIC In objNICs
    If objNIC.IPEnabled Then
    objNIC.SetDNSServerSearchOrder Array("0.0.0.0","0.0.0.0")
    End If
    Next
    Last edited by jackdaniels; 03-31-2008 at 01:52 AM.

  2. #2
    Join Date
    Mar 2007
    Posts
    452
    i liked that... i can use it aswell

Similar Threads

  1. Custom Message Dialog
    By Dermot in forum AutoPlay Media Studio 6.0
    Replies: 23
    Last Post: 09-06-2009, 12:13 PM
  2. Function needed: Registry Set permissions
    By Solmos in forum AutoPlay Media Studio 7.5 Suggestions
    Replies: 2
    Last Post: 03-31-2008, 08:26 AM
  3. Function needed: Registry Set permissions
    By Solmos in forum AutoPlay Media Studio 7.5
    Replies: 2
    Last Post: 03-27-2008, 02:14 PM
  4. Custom Dialog Problem - Please !
    By shervin in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 07-26-2007, 06:36 AM
  5. INFO: How to Set the Default Application Directory
    By Support in forum Setup Factory 6.0 Knowledge Base
    Replies: 0
    Last Post: 09-25-2002, 12:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts