0

I am doing a blazor server application which is launch the application that is launched in the user's local machine.

Note this is an internal application that uses Windows Authentication. We are using modern browers edge, chrome, firefox.

ActiveXObject won't work with this one. What is the best option to launch an exe.

I tried System.Diagnostics.Process.Start("userdesktopApplication.exe") the problem is that the application starts from the server and I need to start the application from the client machine that is invoking the web address.

Thank you in advance.

the_moes
  • 1
  • 3
  • 1
    possible duplicate? https://stackoverflow.com/questions/916925/how-to-launch-an-exe-from-web-page-asp-net (one of the answers shows how to register a protocol handler) – Nikki9696 Dec 18 '20 at 19:30

2 Answers2

4

The only way these days is to ask the user to install an application first.

Then, that application can register with the OS to handle custom URL scheme.

O'Rooney
  • 2,878
  • 2
  • 27
  • 41
  • This should have been the answer – rdmptn Dec 20 '20 at 09:08
  • The application is on the user machine. I will proceed with your suggestion. Do you have any ideas on how to go about it though? – the_moes Dec 21 '20 at 19:40
  • I don’t. But Google or stack overflow will :) – O'Rooney Dec 21 '20 at 23:04
  • 1
    https://stackoverflow.com/questions/80650/how-do-i-register-a-custom-url-protocol-in-windows – O'Rooney Dec 21 '20 at 23:06
  • Thanks O'Rooney, I have implemented the following and it seems to launch the app perfectly. However I need to pass parameters esp to the "%1" so as I can launch different documents by use of parameter pass. Any example of that? – the_moes Dec 24 '20 at 09:43
  • Here is another link that I have found: https://stackoverflow.com/questions/11682470/run-another-local-application-in-asp-net-website/11682671 – the_moes Dec 24 '20 at 09:44
2

You can't. Blazor can't do what JS can't do either - is still a web app

rdmptn
  • 5,413
  • 1
  • 16
  • 29