-3

I have a Google Chrome extension. I want to have a C# application open when i click a button in an extension popup. All the answers I've found are about google chrome apps and not google chrome extensions. How i can do this ? I need a simple example.

Tom Red
  • 81
  • 1
  • 2
  • 5
  • Chrome extensions run in a sandbox with no access to the rest of your machine, I'm pretty sure this isn't possible. – DavidG Nov 30 '20 at 11:32
  • 2
    imagine a browser extension just randomly startig applications on your computer. is that something you'd want? no. so i suggest you find a better solution for what you're trying to achieve. – Franz Gleichmann Nov 30 '20 at 11:33
  • There are extensions that perform this function by opening an application installed on the machine. – Tom Red Nov 30 '20 at 11:53

2 Answers2

0

You cannot invoke any application directly from chrome extension or URL, but you can invoke application via chrome extension via URL handler and for that you have to register application to handle specific url scheme.

you can find more info on ms link : https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/aa767914(v=vs.85)?redirectedfrom=MSDN

Another reference link How do I register a custom URL protocol in Windows?

once you done with protocol handler registration you just have to invoke that url from extension.

best examples of URL handlers are :

Skype : callto:<screenname>

Email : mailto:<address>[?<header1>=<value1>[&<header2>=<value2>]]

Anant Dabhi
  • 10,864
  • 3
  • 31
  • 49
0

Wheb using chrome You can't have an app with a gui. But you can use native messaging so your extension will talk by json messages with an executable that was coded using c++ or c# code.

https://developer.chrome.com/extensions/nativeMessaging

Ziv Adler
  • 169
  • 2
  • 11