Kowala Posted May 17, 2007 Share Posted May 17, 2007 I am very new to scripting yet throughly impressed with what Autoit is capiable of. I am trying to use it to run a simple uninstall for software that has no uninstall program. I am linking to the uninstall record found in Control Panel. Below is my basic script. run ('C:\Windows\st6unst.exe -n "C:\Program Files\Vanguard\st6unst.log"') winwaitactive ("Application Removal","Are you sure") send ("!y}") winwaitactive ("Shared Component","&Keep") send ("!k") This script runs fine...up to the final window. I have tried everything it seems but cant get the final window to close after the uninstall is finished. All that is required is a {SPACE} or {ENTER} to close the final window. Using send didnt work to close last window. Another strange issue. I push my compiled .exe file remote computers with VNC. Oddly the script will run untill line 2. It activates the uninstall but dosnt click the buttons. This exact same script will work when ran locally...yet wont run when triggered by script remotely. Apologies for such newbie questions. Very dedicated learning this program and using it within our IT department. Kowala Link to comment Share on other sites More sharing options...
Zedna Posted May 17, 2007 Share Posted May 17, 2007 (edited) Try to use ControlSend() or ControlClick() instead Send().Look into HelpFile for details about it.EDIT: Also try winwait() instead of winwaitactive() Edited May 17, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
lordlol Posted May 18, 2007 Share Posted May 18, 2007 in the last step try: Send ("!" & "{F4}") this should work =) ~lordlol Link to comment Share on other sites More sharing options...
Zedna Posted May 18, 2007 Share Posted May 18, 2007 in the last step try: Send ("!" & "{F4}") this should work =) ~lordlol Last step will be WinClose() or even WinKill() Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Kowala Posted May 18, 2007 Author Share Posted May 18, 2007 Last step will be WinClose() or even WinKill() Thank you very much. Link to comment Share on other sites More sharing options...
Kowala Posted May 19, 2007 Author Share Posted May 19, 2007 Here is how my uninstall script has progressed. I have read the help file a couple times yet seem to be stuck on a windows focus issue. The first uninstall goes smooth. The second launches yet fails to do the ALT commands via send. I have verified that the "AVG 7." window dosnt have focus. I have tried the WinActivate to give the window focus without sucess. Something very odd is that if I run the script locally on the machine it works flawlessly. If I push the script out the same remote machine it hangs right after launching AVG uninstall. Thank you for your continued patience. I am really enjoying what I have been learning off these boards. Kowala Run('C:\Windows\st6unst.exe -n "C:\Program Files\Vanguard\st6unst.log" -f -q') ;Sucessful unattended Vanguard Uninstall Sleep(3000) Run("c:\Program Files\Grisoft\AVG7\setup.exe") WinWait("AVG 7.","&Next") WinActivate("AVG 7.","&Next") Sleep(1000) Send("!n") Sleep(1000) Send("!c") Sleep(1000) Send("!a") Sleep(15000) Send("!u") Sleep(1000) Send("!n") Sleep(1000) Send("!y") Sleep(15000) Send("{SPACE}") Send("!o") Link to comment Share on other sites More sharing options...
herewasplato Posted May 19, 2007 Share Posted May 19, 2007 ...if I run the script locally on the machine it works flawlessly. If I push the script out the same remote machine it hangs right after launching AVG uninstall...How are you "pushing it" out? [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Gif Posted May 19, 2007 Share Posted May 19, 2007 use autoit tags... Link to comment Share on other sites More sharing options...
Kowala Posted May 21, 2007 Author Share Posted May 21, 2007 How are you "pushing it" out?I am using the VNC Scan software. It allows you copy a script and additional files to a client machine in a local directory.Autoit Tags? Will research those.Kowala Link to comment Share on other sites More sharing options...
Gif Posted May 21, 2007 Share Posted May 21, 2007 Autoit Tags? Will research those. Kowala you misunderstood me, probably the problem is that i dnt speek good english, however i meant when you give an autoit code just use autoit bb code so you can have this autoit code look in BB code help when you are posting something 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