Forum Discussion
Dmitry_Nikolaev
14 years agoStaff
Hi Audrey,
It seems you are using the How To script. You need to make corrections to the script you posted, not the original one. Try using the following script:
Sub SelectApplicationFromControlPanel()
Dim WshShell, oExec, p, w, applicationWnd
Dim button, applicationName, buttonName, programsList
applicationName = "APPLICATION_NAME"
buttonName = "Uninstall*"
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("RunDll32.exe shell32.dll,"&_
"Control_RunDLL appwiz.cpl,,0")
BuiltIn.Delay(10000)
Sys.Process("Explorer").Refresh()
Set p = Sys.Process("Explorer", 2).FindChild("WndCaption", "Programs and Features")
If Not p.Exists Then
Call Log.Error("The 'Add or remove programs' dialog was not found")
Else
Set programsList = p.FindChild("WndClass", "SysListView32", 20)
Log.Message(p.FullName)
Call programsList.ClickItem(applicationName, 0)
Dim propArray(1)
propArray(0) = "Caption"
propArray(1) = "ObjectType"
Dim valuesArray(1)
valuesArray(0) = buttonName
valuesArray(1) = "Button"
Set button = p.FindChild(propArray, valuesArray, 20)
Call button.Click()
'Insert Uninstall Code Here
p.Close()
End If
End Sub
Does this help?
Related Content
- 3 years ago
- 5 months ago
Recent Discussions
- 4 days ago
- 4 days ago