Jump to content

Un-installation problem


 Share

Recommended Posts

Hi all,

I need some help in the following context using AutoITv3.

OS - Windows 7 Home Premium x64

Background: I am trying to automate uninstallation of an application because I am required to re-use different builds of

the same application through out the period of testing this application. The application needs to be uninstalled to test

the new build provided. I feel this is also "something" to start with automation because otherwise I have no knowledge

about it.

The installer does not have switches for uninstallation via exe.

So far I have been successful in getting the uninstaller to start via AutoITv3 script from "Programs and Features window".

Scenario:

When the Installer Kicks in, following sequence of events happen.

A) "XYZ" titled window pops up where the installer prepares the uninstallation files which just has a cancel button. During

this screen installer extracts the required files in the Windows environment set Temp folder to continue with the rest of

the uninstallation.

:) "XYZ" (Same titled window) now shows some thing like `Do you want to uninstall` with Yes, No buttons. Default

highlighted is Yes.

Issue:

I am unable to tell the AutoITv3 to send Yes or No keys from the keyboard to the second window titled "XYZ".

As a result the script does not execute further.

There is a delay between the two windows described in Step A and Step B under the Scenario section.

I have tried the "Sleep" command just before hitting step A but it is not working.

The part of the script around Step A and Step B looks like this

WinWaitActive("Programs and Features")

send("XYZ"); Title name of the program to select from the list of programs to be uninstalled.

send("{ENTER}"); invokes the uninstall.

Sleep(6000); wait for 6 seconds to get to Step B.

winwaitactive("XYZ"); wait untill the XYZ titled window is available on the screen.

send("N"); to continue Yes or No. No - in this case with the uninstallation at Step B to stop the uninstallation.

The result I have been getting instead is that it just remains at the second window titled XYZ at Step B.

Any suggestions?

Also is there a way to trace this script step by Step with in AutoIt3 to see why the Send("N") is not being invoked or may

be invoked at the wrong time?

Link to comment
Share on other sites

What kind of installer is it? (e.g. MSI, Installshield) Perhaps there is an uninstall.exe file located in it's program folder that you can run to invoke the uninstaller. Also, check the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" subkeys for your program. It will have the uninstall commandline.

Link to comment
Share on other sites

What kind of installer is it? (e.g. MSI, Installshield) Perhaps there is an uninstall.exe file located in it's program folder that you can run to invoke the uninstaller. Also, check the "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" subkeys for your program. It will have the uninstall commandline.

I checked in the path you've suggested and it is not there. As far as I can tell it is a Installshield wizard.

Link to comment
Share on other sites

It may be a "wrapped" MSI install. Did you search all the subkeys in the registry value for your program's name? Anyways, post the summary page from the AU3Info Tool with the Control that you want to activate highlighted

Link to comment
Share on other sites

It may be a "wrapped" MSI install. Did you search all the subkeys in the registry value for your program's name? Anyways, post the summary page from the AU3Info Tool with the Control that you want to activate highlighted

I have attached the files of both the first and second window with AutoIt info tool. They contain the details of summary section tab in AutoItv3. Looking at both the details, I saw that both the windows had a different handle, so employed a do until loop, until handle becomes different of a second window. I am sure the control is at second window(added a msgbox to check it) however AutoIt is unable to recognize the send keys on this second window. I thank you for looking in to it. I will try other things to see if I can get this to work.

Another thing about the Installer is, regardless of if I find the string in registry, the un-installation wizard is going to be the same. Therefore sooner or later I will get stuck at the same point where I am now. Thanks for the thought.

I could employ the mouse cursor control indicating the X and Y co-ordinates to click the Yes button, but I refrain from doing it because if I try this on computers with different resolution, it will most likely not work.

First Window.txt

Second window.txt

Edited by rockbala
Link to comment
Share on other sites

Have you tried to use instances and ControlSend() yet?

First window:

ControlSend("[TITLE:Web TimeSheet Integration Manager for QuickBooks; INSTANCE:1]", "", "", "!N")

Second window:

ControlSend("[TITLE:Web TimeSheet Integration Manager for QuickBooks; INSTANCE:2]", "", "", "!Y")
Edited by Varian
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...