Jump to content

Uninstalling software Script


MaxU77
 Share

Recommended Posts

There is situation when I often need to use PC with and without particular software installed during the day.

The software is not standalone one - it is an update.

I've written script for installing update but I also want some kind of uninstalling script

My main problem - I don't have any idea on how to write script for uninstalling since updates don't have any uninstall.exe to run and the only way i know is to uninstall it from Add/Remove programs.

Please help.

Link to comment
Share on other sites

You will have to make an uninstall.exe otherwise the user can't uninstall from the Add/Remove programs as it requires you to have a exe file to be associated with the Add/Remove programs entry.

Link to comment
Share on other sites

You will have to make an uninstall.exe otherwise the user can't uninstall from the Add/Remove programs as it requires you to have a exe file to be associated with the Add/Remove programs entry.

Wait wait... As I understand MaxU77, there seems to be a line in the Add/Remove Programs menu for uninstalling the specific update that works fine, his question is how to automate that. The brute force way would be to automate clicking all the way to there through the start menu, but that's probably not foolproof enough...

The fact that uninstalling the update from Add/Remove Programs seems to work should mean that there is a direct command in the registry that is ran when you uninstall it from Add/Remove Programs. On my 64 bits Windows 7 system, they seem to be in :

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall

You might have to search a bit to find out where it is in your registry if you use another version/architecture but it should be in there somewhere.

That command should be possible to run from the script, you might still have to automate some windows that the uninstaller itself gives you though...

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
Share on other sites

The cute rabbit you are! :-)

I see in registry (exactly where you told they should be) a lot of folders some of which named same as lines in Add/Remove and some meaningless, I guess they are named in some PC-readable manner rather then Human-readable. I'll keep trying to find my favourite update among those PC-readable ones...

The brute force way would be to automate clicking all the way to there through the start menu, but that's probably not foolproof enough...

Indeed I can't even imagine that "brute force way".

The fact that uninstalling the update from Add/Remove Programs seems to work should mean that there is a direct command in the registry that is ran when you uninstall it from Add/Remove Programs.

Under command you probably mean the value of "Uninstall string" in the registry folder named as that update? Just execute it? So easy?

Link to comment
Share on other sites

It's done now.

I've found registry folder with "DisplayName" = name in add/remove browser and UninstalString...

Sorry for having asked here the question that occured to have no relation to AutoIt.

Thanks for help.

Best regards.

The non-human-readable lines are GUID's (Globally Unique IDentifiers) of the installers, I have no idea why some apps are there by name and others by GUID.

Anyway, glad to see it helped you!

About asking a non-autoit-related question: no problem ofcourse... You are doing some autoit work and you encounter something hard, so you come here. If the solution is actually something that is more Windows support than AutoIt, so be it! :graduated:

/edit: you even took the trouble to post your progress and said thank you... One can't say that for all forum newcomers :(

Edited by SadBunny

Roses are FF0000, violets are 0000FF... All my base are belong to you.

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