Lance Posted October 11, 2005 Share Posted October 11, 2005 I am using autoit to installing a driver through device manager. I have successfully written the script to install the driver. The problem I am having is closing the window when the install is finished. I tried using... Sleep(10000) Send("{ENTER}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Send("!f") Send("x") But nothing happens. I am fairly sure the install from the previous step is much less than 10 seconds and the window still has focus after the install is done. Any help would be greatly appreciated! Link to comment Share on other sites More sharing options...
Valuater Posted October 11, 2005 Share Posted October 11, 2005 how are you starting the device manager 8) Link to comment Share on other sites More sharing options...
Lance Posted October 12, 2005 Author Share Posted October 12, 2005 how are you starting the device manager8)I am usingrun(@comspec & ' /c ' & @SystemDir & "\devmgmt.msc", @SystemDir, @sw_hide) Link to comment Share on other sites More sharing options...
Skruge Posted October 12, 2005 Share Posted October 12, 2005 Sleep(10000)Send("{ENTER}")Send("{TAB}")Send("{TAB}")Send("{ENTER}")Send("!f")Send("x")On my system, (after launching Device Manager), all this would do is select the root item, then quit. What state is device manager in when your script runs? Also, why not install from an .INF or Devcon? [font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font] Link to comment Share on other sites More sharing options...
Lance Posted October 12, 2005 Author Share Posted October 12, 2005 Here is the whole script if it helps *** Starts Device manager Opt("SendKeyDelay", 50) run(@comspec & ' /c ' & @SystemDir & "\devmgmt.msc", @SystemDir, @sw_hide) Sleep(3000) *** Goes to the correct device and opens the properties Send("{TAB}") Send("o") Send("{RIGHT}") Send("m") Send("{ENTER}") *** Launches reinstall driver, browses to driver inf folder, and starts the install Send("{ENTER}") Send("!t") Send("!n") Send("!s") Send("!n") Send("!o") Send("!r") Send("m") Send("{RIGHT}") Send("b") Send("{RIGHT}") Send("w") Send("{RIGHT}") Send("t") Send("{RIGHT}") Send("h") Send("{RIGHT}") Send("m") Send("{RIGHT}") Send("wintv-pvr-250mce") Send("{ENTER}") Send("!n") *** Waits 10 secs for install to complete, supposed to hit enter for highlighted finish button, and close program manager -- This is the only part that doesn't work Sleep(10000) Send("{ENTER}") Send("{TAB}") Send("{TAB}") Send("{ENTER}") Send("!f") Send("x") Link to comment Share on other sites More sharing options...
Valuater Posted October 12, 2005 Share Posted October 12, 2005 did you try this... it works for me ??? Run(@comspec & ' /c ' & @SystemDir & "\devmgmt.msc", @SystemDir, @sw_hide) Sleep(5000) WinClose("Device Manager") 8) 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