WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Control Manager
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Uninstall application Add-remove.txt

Keywords: Uninstall application Add remove control panel 

Question:

What is the best way to install a software Application through automation? Would it be efficient to uninstall it from an uninstall wizard and recording it's key stroke or unisntalling it manually from file folders and the registry?

Answer:

You could use the control manager functions to uninstall the app via the control panels add/remove programs. This actually using the application uninstall routine, and you better guaranteed a complete uninstall....
; Run Add/Remove Programs

Run("rundll32.exe", "shell32.dll,Control_RunDLL appwiz.cpl")

;Note:  This example designed for Windows 95

AddExtender("wwctl34I.dll")

removeapp="RealJukebox"

Run("rundll32.exe", "shell32.dll,Control_RunDLL appwiz.cpl")

mainwnd=DllHwnd("Add/Remove")

child2hwnd= cWndByName(mainwnd,"Install/Uninstall")

lbWnd=cWndbyID(child2hwnd,1025)

response=cGetLBText(lbwnd)

app=ItemLocate(removeapp, response, @tab)

if app==0

   Message(removeapp,"Not Found")

else

   cSetLBItem(lbwnd,app)

   Message(removeapp,"Selected")

endif

;Add when completely debugged

;buttonWnd=cWndbyID(child2hwnd,1026)

;cClickButton(buttonWnd)

exit



Article ID:   W14526
Filename:   Uninstall application Add-remove.txt
File Created: 2017:07:28:13:58:28
Last Updated: 2001:03:02:14:38:54