Forum Discussion
AlexeyKolosov
15 years agoStaff
Hi Srikanth,
We have checked this on several operating systems including Windows 2000 Server - this line doesn't give any errors. Below, is an operable script for Windows Server 2000:
Exactly what error do you get?
There was an error in the script code. We've corrected it.
Most probably, you have mistyped the class name. It must be exactly DirectUIHWND.
using remove prgs link i got error at
var oExec = WshShell.Exec("RunDll32.exe shell32.dll," + "Control_RunDLL appwiz.cpl,,0");
We have checked this on several operating systems including Windows 2000 Server - this line doesn't give any errors. Below, is an operable script for Windows Server 2000:
function Test()
{
var applicationName = "APPLICATION_NAME";
var buttonName = "Remove";
var WshShell = new ActiveXObject("WScript.Shell");
var oExec = WshShell.Exec("RunDll32.exe shell32.dll," + "Control_RunDLL appwiz.cpl,,0");
BuiltIn.Delay(5000);
Sys.Refresh();
var p = Sys.FindChild("CommandLine", "mshta.exe res://appwiz.cpl/default.hta");
if (!p.Exists)
{
Log.Error("The 'Add or remove programs' dialog was not found");
}
else
{
var w = p.FindChild("WndCaption", "Add/Remove Programs");
PropArray = new Array("innerText", "ObjectType");
ValuesArray = new Array(applicationName, "Cell");
var applicationCell = w.FindChild(PropArray, ValuesArray, 50);
if (!applicationCell.Exists)
{
Log.Error("The " + applicationName + " was not found");
}
else
{
applicationCell.Click();
PropArray[0] = "innerText"; PropArray[1] = "ObjectType";
ValuesArray[0] = "*"+buttonName+"*"; ValuesArray[1] = "Button";
applicationCell.parent.FindChild(PropArray, ValuesArray, 50).Click();
}
}
}
Exactly what error do you get?
and it is giving error at
WScript.Echo('"' + applicationName + '" was not found');
There was an error in the script code. We've corrected it.
In the Object Browser, Programs are not populating in Windows XP .
could any body please help me how to make the programs populated in that ADD/Remove programs in the object browser.
Most probably, you have mistyped the class name. It must be exactly DirectUIHWND.
Related Content
- 5 months ago
- 4 years ago
Recent Discussions
- 11 hours ago