How to access C:\Program Files\… path of client PC in Asp.NET C#?

后端 未结 3 940
我寻月下人不归
我寻月下人不归 2021-01-27 05:58

I have an Asp.NET web application. I can call and run Teamviewer in my application when running on local.

I have a class for call and run TeamViewer.

cla         


        
3条回答
  •  鱼传尺愫
    2021-01-27 07:01

    This is possible, but you still need to run an executable or a .reg file on the client's machine to register a protocol handler.

    Those kinds of applications (e.g., uTorrent and magnet links, etc), usually define a URI scheme and register a protocol handler on the client's computer.

    For example, this is a sample URI for a magnet link:

    magnet:?xt=urn:sha1:YNCKHTQCWBTRNJIV4WNAE52SJUQCZO5C
    

    Then, your ASP.NET application can redirect the user to a URI like that, and the OS will notice that there's a protocol associated to that URI and ask the user if he wants to launch that application.

    See:

    1. Creation of link to launch TeamViewer
    2. Registering an Application to a URI Scheme
    3. How can I add a custom url handler on Windows. Like iTunes itms://

提交回复
热议问题