How to check the Microsoft Edge window that is already started

Asked 2 years ago, Updated 2 years ago, 392 views

There are two things I would like to do.

  • Start Edge from C# application
  • --app allows only one site to start
  • Allow concurrent access to other sites

Based on the assumption above, I would like to know how to determine if you have access to the same site (app) if you have an edge process that has already started.

c# microsoft-edge

2022-09-30 22:03

1 Answers

It feels like XY problem.Isn't there something you really want to do or have to limit, and the way you come up with it is to ask the question?

For example, if you simply think about it, why don't the Edge Launcher program created with C# do it within your responsibilities instead of getting any information or requesting it to work from Microsoft Edge?

  • There are many articles that prohibit multiple launches of programs using named mutex, so you can use them to prevent multiple launch of Edge launcher programs created with C#.
  • The Edge Launcher Program created with
  • C# should launch the Microsoft Edge with the --app option in its main process and monitor it permanently until the launched?
    Since it's a self-launched program, you'll know process information such as PID, and you should wait for the process to end (such as a forced interruption) before ending the Edge launcher program
    created with C#.

However, you will not be able to manually launch the equivalent Microsoft Edge using the --app option without using the C# Edge launcher program, and you will not be able to access it using Chrome or Firefox.

If you really want to impose strong restrictions, you might want to ban access to the site on individual PCs and networks from using general-purpose browsers, such as firewalls/virus checkers/proxy servers/gateway servers, and access only special programs using controls such as Microsoft Edge WebView 2.

Such a dedicated program would make it easier to implement restrictions such as having only one boot/access and some unique behavior than a generic program that you can't change yourself.


2022-09-30 22:03

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.