Jump to content

Change Tcp/ip Setting To Specific Value?


Recommended Posts

I'm clueless about this one,

I work on a laptop and my TCP/IP setting at home need to be setted to "obtain an IP address automatically", and "Obtain DNS server adreess automatically"

But a t work i need to set it to a specific IP adress, Subnet mask, default gateway, and preferrer DNS server.

It would be great if i could just click on an autoit script that makes the change itself instead of having to click on the network conection an input the IP numbers and other every single time. (and vice versa to switch it back to "obtain automatically" once i get back home)

I have tryied to work with Cmd prompt using ipconfig but I'm not quite sure that it is the way to go.

I'm probably not the first one thinking of that issue so if someone could share some advice, that would be great.

Link to comment
Share on other sites

Hi,

there are several tools from the producers of laptops which can do that and a lot more for you.

If it is an ThinkPad have a look at IBM Access Connections.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

I'm clueless about this one,

I work on a laptop and my TCP/IP setting at home need to be setted to "obtain an IP address automatically", and "Obtain DNS server adreess automatically"

But a t work i need to set it to a specific IP adress, Subnet mask, default gateway, and preferrer DNS server.

It would be great if i could just click on an autoit script that makes the change itself instead of having to click on the network conection an input the IP numbers and other every single time. (and vice versa to switch it back to "obtain automatically" once i get back home)

I have tryied to work with Cmd prompt using ipconfig but I'm not quite sure that it is the way to go.

I'm probably not the first one thinking of that issue so if someone could share some advice, that would be great.

Outside of AutoIT, there are numerous Network Switcher programs, many free, which keep multiple network configurations and activate via a GUI interface.

:think:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Maybe use netdom.exe with an autoit script to automate the process

http://support.microsoft.com/default.aspx?...;298593&sd=tech

;Move Domain
    Case $Msg   = $MoveDomitem
    $cdomainCMD = Run(@ComSpec & " /c NETDOM.exe move  /domain:"& $cdomain &" %COMPUTERNAME% /USERD:" & $cdomain &"\"& $cuser &" /passwordd:"&$cpass,"", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)

The variables $cdomain, $cuser and $cpass could be hardcoded or read from a ini file and the network could be detected via the IP assigned for example at one of our offices the LAN is 192.168.2 and at the other 192.168.1 and the correct domain, user and pass selected

Edited by pageone
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...