franov Posted April 23, 2006 Share Posted April 23, 2006 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 More sharing options...
Xenobiologist Posted April 23, 2006 Share Posted April 23, 2006 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 More sharing options...
PsaltyDS Posted April 24, 2006 Share Posted April 24, 2006 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. 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 More sharing options...
kclteam Posted April 25, 2006 Share Posted April 25, 2006 Maybe this will helpMSDN Info about Netsh I believe we should all pay our tax with a smile. I tried - but they wanted cash! Link to comment Share on other sites More sharing options...
pageone Posted April 25, 2006 Share Posted April 25, 2006 (edited) Maybe use netdom.exe with an autoit script to automate the processhttp://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 April 25, 2006 by pageone Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now