first, i´m not very in with coding oder development, so i have a user code from another project for closing all browser windows.
i tried to use it, it works for Firefox, IE and Chrome but not for the EDGE browser. I need a little assistance, what i have to change on this code to make it work also with EDGE.

Ranorex does not work with Edge DOMs unless you are using a WebDriver endpoint. This is an issue with how MS designed Edge, and there is nothing Ranorex can do about it.

Your options are to (a) use a WebDriver endpoint (best option), (b) close Edge's window directly instead of using the DOM.

Really, the ONLY option is to use WebDriver with web pages from this point forward, otherwise you won't be able to do any testing with Edge, and that would mean making special tests for Edge vs everything else. If you use WebDriver endpoints, though, you can test all browsers from the same test suites.

As krstcs mentioned, Ranorex has limited object recognition in Edge's DOM unless using a WebDriver, however, it can access and interact with the Edge form to close it. To close Edge without code, use "Close Application" or "Invoke Action > Close()".