Forum Discussion
AlexeyKolosov
14 years agoStaff
Hi,
The following script works with the 'Programs and Features' window in Windows 7:
function test()
{
var applicationName = "APPLICATION_NAME";
var bCaption = "Uninstall*";
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("RunDll32.exe shell32.dll," + "Control_RunDLL appwiz.cpl,,0");
Delay(15000);
Sys.Process("Explorer").Refresh();
var wnd = Sys.Process("Explorer").FindChild("WndCaption", "Programs and Features");
if (!wnd.Exists)
{
Log.Error("The 'Programs and Features' window was not found");
}
var programsList = wnd.FindChild("WndClass", "SysListView32", 20)
Log.Message(programsList.FullName);
programsList.ClickItem(applicationName, 0);
var propArray = new Array("Caption", "ObjectType")
var valuesArray = new Array(bCaption, "Button")
var button = wnd.FindChild(propArray, valuesArray, 20);
button.Click();
}
Related Content
- 5 months ago
- 4 years ago
Recent Discussions
- 11 hours ago