Jump to content

Find uninstaller/automate uninstaller?


Aarstad
 Share

Recommended Posts

Hi guys. It's the scripting newb again.

I am trying to automate a program which is to be uninstalled, then reinstalled with a newer version. It is very simple and I can easily manage that. However, I can't find the uninstaller file in the folder, but I *can* uninstall it from the add or remove programs.

Is there a different way to automate uninstalling the files than through the control panel version? I think it can be a pain to do it the traditional way. If it's not possible when the uninstaller is not to be found. How can I automate the add or remove programs feature? Auto info tool doesn't show me relevant info in a reliable way to automate it.

Thanks for the feedback, you rock.

Link to comment
Share on other sites

you can look into registry.

#include<GUIConstants.au3>


$gui_width = 500
$gui_height = 600

Global $count = 1, $all_keys = "", $main_key = "HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstall"

GUICreate("Installed Software", $gui_width, $gui_height, @Desktopwidth/2 - $gui_width/2, @DesktopHeight/2 - $gui_height/2 - 75)
$gui_list = GUICtrlCreateList ("", 10, 10, $gui_width - 20, $gui_height - 20)
GUISetState ()

While 1
$act_key = RegEnumKey ($main_key, $count)
If @error <> 0 then ExitLoop
$act_name = RegRead ($main_key & "" & $act_key, "UninstallString")
$act_name = StringReplace ($act_name, " (remove only)", "")
If $act_name <> "" Then $all_keys = $all_keys & $act_name & "|"
$count = $count + 1
WEnd

GUICtrlSetData ($gui_list, $all_keys)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend
Link to comment
Share on other sites

in your registry, find the software under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall

use the uninstall string found there.

*seconds late

Edited by boththose

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

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