Results 1 to 4 of 4

Thread: Change To Static IP

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    3

    Change To Static IP

    I have a script I am working on that needs to change the registry settings of the active Wireless NIC.

    It Turns on and of DHCP Mode and will add the static information.

    Where my problem is at is in the REG_MULTI_SZ,,, I think. What is happening is the Gateway and IP are being added but it is also adding garbage to the string.

    Here is my Multi_Sz Code
    Code:
    Public Sub SaveMultiSZ(hkey As Long, strPath As String, strValue As String, strdata As String)
        Dim keypath As Long
        Dim w As Long
        w = RegCreateKey(hkey, strPath, keypath)
        w = RegSetValueEx(keypath, strValue, 0, REG_Multi_SZ, ByVal strdata, Len(strdata))
        w = RegCloseKey(keypath)
        
    End Sub
    It could be as simple as needing to add a carriage return at the end on the IP address but forgot the Command to do this.

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    3

    Re: Change To Static IP

    vbNullChar NOT NullChar or CRLF. 2 little letters.....

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2005
    Posts
    3

    Re: Change To Static IP

    now working on finding the ssid's and Wep info to be able to change this info in a script.

    Anyone know where XP stores this information?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Change To Static IP

    Quote Originally Posted by TCS_Chuck
    vbNullChar NOT NullChar or CRLF. 2 little letters.....
    Did this solve the issue, or are you still having a problem?

Posting Permissions

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



Click Here to Expand Forum to Full Width