omikron48 Posted August 21, 2009 Share Posted August 21, 2009 Hello. I made a script that will configure the TCP/IP settings for the LAN connection. The only thing missing is how to bring up the window programmatically. As it is, I have to manually open the properties window before my script takes over. Is there any reliable way to bring up that window through code? The assumptions are that there is only one LAN connection but the its name may be variable. Also, as an aside, is there any way for AutoIt to interact well with flash menus? I tried creating an installation script for Blackberry Desktop Manager 4.7 but is says that the flash menu that appears when you run the installer is just one big control. Using click coordinates is unreliable. Is there anyone with a better idea? My installer copy was taken from the CD packaged with the unit. Link to comment Share on other sites More sharing options...
Manjish Posted August 21, 2009 Share Posted August 21, 2009 (edited) Answer to question number 1..Set the ipadress from command prompt by using run(). Check how this is done Edited August 21, 2009 by Manjish [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
autoitxp Posted August 21, 2009 Share Posted August 21, 2009 may this help #include <Constants.au3> local $command local $data While 1 Sleep(100) $command = Run(@ComSpec & " /c " & "netsh interface ip show config","", @SW_HIDE , $STDERR_CHILD + $STDOUT_CHILD); While 1 $data &= StdoutRead($command) If @error Then ExitLoop Wend $data = StringReplace($data, @LF,"") $data = StringSplit ($data, @CR) for $i = 1 to $data[0] select case stringinstr ($data[$i], "Configuration for interface ") $config = StringReplace ($data[$i], "Configuration for interface ","") case Else endSelect Next ConsoleWrite($config) Run(@ComSpec & " /c " & 'netsh interface ip delete address ' & $config & ' gateway=all', "", @SW_HIDE); WEnd Link to comment Share on other sites More sharing options...
omikron48 Posted August 24, 2009 Author Share Posted August 24, 2009 Thanks for the help. I now have a working TCP/IP configuration script. Netsh works well when editing settings but I can't seem to make 'dump <file>' or 'set file' work outside of netsh. I mean just running the command from the command prompt, instead of from the netsh prompt. I can make 'set file open <file>' work when inside the netsh prompt but can't call it using 'netsh interface ip set open <file>' in the command prompt. 'dump <file>' fails me from the start, it only prints the info in the command console but doesn't dump it in a file. I can only make 'set file' work in the command prompt by using 'netsh exec <script>'. I'm using XP sp3. Anyone experiencing the same thing? Also, is there any way of capturing text that dos commands output in the command console? 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