Forum Discussion

Oferv's avatar
Oferv
Super Contributor
12 years ago

Add/Remove programs window stays open,how to close it???

Hi,



two things,I'm using this (JS)code to remove program: http://support.smartbear.com/viewarticle//?aid=9012



1.in windows 7 there's no title/header for the add/remove programs window so it can't be identify so what i did in order solve that is to replce "Programs and Features" with "*",i'll be happy to have more reliable solution.





var DUIView = Sys.Process("Explorer").Window("CabinetWClass", "Programs and Features", 1).Window("ShellTabWindowClass", "Programs and Features", 1).Window("DUIViewWndClassName", "", 1);

2. and more importnat for me right now is that after the application has been uninstall i want the add/remove window to get close.if someone can send me the code line that is closing this window i'll be very happy.

thanks

2 Replies

  • Oferv's avatar
    Oferv
    Super Contributor
    OK i've used this Sys["Process"]("Explorer").Window("CabinetWClass", "", 1)["Close"]() and it's doing the job i just wanted to know if it's right to use it.



    thanks
  • ramu6309's avatar
    ramu6309
    Occasional Contributor
    Hi ,



    Please take the object upto window only i.e



    Following is the code in VB Script.



    Set Window = Sys.Process("explorer").WaitWindow("CabinetWindowClass","Programs and Features",1,5000)

    If Window .Exists Then

       Call Window.Close

    End If



    I hope this will helps you.



    Regards,

    Ramarao