Change Subnet Mask VB
Results 1 to 6 of 6

Thread: Change Subnet Mask VB

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Posts
    1,499

    Question Change Subnet Mask VB

    O.K the time has finally come to increase my IP pool.

    Does anyone know if you can change a subnet mask from vb ?

    I want to write a little ap that will change this on machines at login.

    Changing IP address is easy but subnet mask is a little more tricky. Little help here guys.

  2. #2
    Senior Member tampabay420's Avatar
    Join Date
    Aug 2002
    Posts
    953
    here ya go, bro:
    How to set local machine IP addresses from your program ?

    Follow this steps :

    1. Open registry on the HKEY_LOCAL_MACHINE

    2. Find the subKey = SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkCards\"netcard# "

    "netcard# " usually is "1" but you can control any subkey and find specific netwrok Adapters

    Refer to "MSDN Registry Entries for Network Adapter Cards"

    3. Get data for the value "ServiceName"

    4. Find the subKey = SYSTEM\CurrentControlSet\Services\"ServiceName"\Parameters\TcpIp"

    5. Set data for the value "IpAddress" to change IP address

    6. Set data for the value "SubnetMask" to change subnet mask

    7. Set data for the value "DefaultGateway" to change default gateway

    8. Reboot your PC.


    How to set local machine HostName from your program ?

    Follow this steps :

    1. Open registry on the HKEY_LOCAL_MACHINE

    2. Find the subKey = SYSTEM\CurrentControlSet\Services\TcpIp\Parameters

    3. Set data for the value "HostName"

    4. Find the subKey = SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName

    5. Set data for the value "ComputerName"

    6. Reboot your PC and HostName will be set.


    WARNING: Modify registry incorrect can cause serious, system-wide problems . Use this at your own risk
    http://www.codeguru.com/network/change_ip.shtml

    now, this might/obviously be different depending on the version of windows... but this is all i could find
    yeah, I\'m gonna need that by friday...

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Posts
    1,499
    Here he comes to save the day (Again).

    Tampabay is secretly a VB super hero.

    Cheers again mate. Didn't think of that.

    Subnet masking time is always a pain in the backside.

  4. #4
    Junior Member
    Join Date
    Mar 2003
    Posts
    4
    I need to know how to change my IP...can someone help me please
    \"my fake friends say they love me but i kno they lie...cuz in the dark i c their heart full of homicide...\"

  5. #5
    Banned
    Join Date
    Aug 2003
    Posts
    130
    This is for mQ8

    (using classic start menu

    Start - settings - network connections - open up ur high speed connection - click properties -
    Highlight internet protocol - then click properties - the rest you should be able to figure out.

    P.S - You might want to ping the IP address you want to use in case someone is already using it. If it shows up as dead or doesnt respond then use it.

  6. #6
    Junior Member
    Join Date
    Sep 2003
    Posts
    6
    i would recommend neotrace or mabry to ping teh ip but it is not a gurantee that ip isnt used, it might be teh person has a firewall up so use at ur own risk

Posting Permissions

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