Jump to content
Sign in to follow this  
Kowala

Uninstall Script

Recommended Posts

Kowala

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

Share this post


Link to post
Share on other sites
Zedna

Try to use ControlSend() or ControlClick() instead Send().

Look into HelpFile for details about it.

EDIT: Also try winwait() instead of winwaitactive()

Edited by Zedna

Share this post


Link to post
Share on other sites
lordlol

in the last step try:

Send ("!" & "{F4}")

this should work =)

~lordlol

Share this post


Link to post
Share on other sites
Kowala

Last step will be WinClose() or even WinKill() :)

Thank you very much.

Share this post


Link to post
Share on other sites
Kowala

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")

Share this post


Link to post
Share on other sites
herewasplato

...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]

Share this post


Link to post
Share on other sites
Gif

use autoit tags...

Share this post


Link to post
Share on other sites
Kowala

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

Share this post


Link to post
Share on other sites
Gif

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×