Mechaflash Posted May 31, 2012 Posted May 31, 2012 (edited) What functions should I be looking into for changing network connection properties? Specifically, I need to target the primary and secondary DNS server addresses and default gateway. Edit: Just in case not to raise any red flags... The guy working in my department before me had entered the prim. and sec. DNS servers in reverse order... and we host our own DNS servers where one is a primary, which accepts any additions/changes, and the secondary syncs with the primary every night. Sometimes we need changes to take effect immediately on all of our machines connected to these DNS servers so there's a need to change the order on the workstations Edited May 31, 2012 by mechaflash213 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
stormbreaker Posted May 31, 2012 Posted May 31, 2012 You could try your luck with netsh.exe (already in Windows). Here's something to get started: Global $adminuser, $adminpass, $admindomain ;=========================================== ;Hard code the user and password here. ;=========================================== $adminuser = "admin" $adminpass = "admin" $admindomain = "" $q = Chr(34) Func _RunAsAdmin($cmd) RunAsWait($adminuser, $admindomain, $adminpass, 1, $cmd) EndFunc;==>_RunAsAdmin $varip = "netsh interface ip set address " & $q & "Local Area Connection" & $q & " dhcp" $vardns = "netsh interface ip set dns " & $q & "Local Area Connection" & $q & " dhcp" _RunAsAdmin($varip) _RunAsAdmin($vardns) ---------------------------------------- :bye: Hey there, was I helpful? ---------------------------------------- My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1
Mechaflash Posted May 31, 2012 Author Posted May 31, 2012 (edited) That works for me. netsh interface ip set address name="Local Area Connection" gateway=192.168.xxx.xxx gwmetric="AUTO" Edited May 31, 2012 by mechaflash213 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”
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