+ Post New Thread
Results 1 to 1 of 1
Scripts Thread, Script to change the wireless or LAN connection in Coding and Web Development; I have created a script that can aid you in changing the IP address of a PC/workstation to either DHCP ...
  1. #1

    nephilim's Avatar
    Join Date
    Nov 2008
    Location
    Dunstable
    Posts
    11,828
    Thank Post
    1,624
    Thanked 1,880 Times in 1,397 Posts
    Blog Entries
    2
    Rep Power
    426

    Script to change the wireless or LAN connection

    I have created a script that can aid you in changing the IP address of a PC/workstation to either DHCP or to an IP.

    as I am unable to upload any files (keeps coming up with a runtime error), here is the code. Input into notepad and save as a .bat file and run on the PC / laptop of your choice. The IP Ranges used are example IP Ranges, change them to fit the IP you wish to assign, the Subnet Mask, the Default Gateway, and the DNS


    Code for changing wireless to DHCP
    netsh interface ip set address name="Wireless Network Connection" static DHCP
    netsh interface ip set dns "Wireless Network Connection" static DHCP

    Code for changing wireless to IP
    netsh interface ip set address name="Wireless Network Connection" static 10.29.25.27 255.255.255.0 10.29.25.1 1
    netsh interface ip set dns "Wireless Network Connection" static 10.29.25.254

    Code for changing LAN to DHCP
    netsh interface ip set address name="Local Area Connection" static DHCP
    netsh interface ip set dns "Local Area Connection" static DHCP

    Code for changing LAN to IP
    netsh interface ip set address name="Local Area Connection" static 10.29.25.27 255.255.255.0 10.29.25.1 1
    netsh interface ip set dns "Local Area Connection" static 10.29.25.254

  2. Thanks to nephilim from:

    LeMarchand (19th June 2012)

SHARE:
+ Post New Thread

Similar Threads

  1. Script to create a VPN connection
    By Norphy in forum Scripts
    Replies: 5
    Last Post: 20th April 2010, 11:37 AM
  2. Troubleshooting a RADIUS wireless lan
    By maniac in forum Wireless Networks
    Replies: 8
    Last Post: 23rd October 2008, 09:10 AM
  3. Wireless LAN name change on Netgear
    By MrsGrinch in forum Wireless Networks
    Replies: 1
    Last Post: 30th June 2008, 08:04 AM
  4. Wireless Network away from LAN
    By gshaw in forum Wireless Networks
    Replies: 2
    Last Post: 19th December 2007, 01:16 PM
  5. Internet Explorer connection script
    By alexknight in forum Wireless Networks
    Replies: 9
    Last Post: 21st September 2006, 12:45 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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