Jump to content

Recommended Posts

Posted (edited)

Hello everyone! I have a problem with the functions I mentioned in the title. I will post a script bellow:

While True
    
    local $wList = WinList()
    
    for $i = 0 to UBound($wList) -1 
        if _ProcessGetName(WinGetProcess($wList[$i][0])) = 'dllhost.exe' Then
            if $wList[$i][0] = 'Internet Protocol v4 (TCP/IPv4) Properties' then
                local $wHandle = WinGetHandle($wList[$i][0])
                ConsoleWrite(WinClose($wHandle) & @crlf) ; > Shows True on Console but window still here
                ConsoleWrite(WinKill($wHandle) & @crlf) ; > Shows True on Console but window still here
            EndIf
        EndIf
    Next
WEnd

The purpose of this program is to close the 'Internet Protocol v4' window, if the program detects, that it is open. But whatever function I use. It does not work. The same problem I encounter if I use functions for Control manipulation like ControlDisable/ControlHide. What should I do. It seems to me, something blocks/prevents the program from executing these function. Can someone help me?  

Edited by Renderer
  • Renderer changed the title to WinClose, WinKill, ControlDisable, ControlHide, etc. - Do not work
Posted

@KaFu, I tried. Tried this from the Admin accout. It works. I found something interesting. Using the _ProcessGetName function i get in the Admin account the 'explorer.exe' process and in my non-Admin account I get the 'dllhost.exe'. Why is that, I don't know. So when the process behind the window is explorer.exe, then I am able to modify/manipulate the window and its controls. When the process is 'dllhost.exe' then I am not able. 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...