How can I assign an https domain to launch my application if its installed?

Rohan Pande 445 Reputation points
2023-12-21T11:32:27.0666667+00:00

I want to launch my application via some link. I was able to do with a custom URL as mentioned here. Followed the steps and I was able to achieve it. But let's say I want to launch my application using an http/https link how can I achieve the same?

Similar how Microsoft Teams application is able to do...

User's image

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,913 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Minxin Yu 13,501 Reputation points Microsoft External Staff
    2023-12-22T03:15:12.0633333+00:00

    Hi, Rohan Pande

    You need to view it through http(s) server.

    enter image description here

    Eg.

    Create HTML and replace your customProtocol :

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>launch app</title>
    </head>
    <body>
    
    
    <a href="#" onclick="launchCustomProtocol()">launch app</a>
    
    
    <script>
        function launchCustomProtocol() {
            // Replace "testurl://asdfg" with your custom protocol
            var customProtocol = "testurl://asdfg";
    
            // Open a new window with the custom protocol
            window.open(customProtocol, "_blank");
        }
    </script>
    
    </body>
    </html>
    
    

    If you have python installed (by Visual Studio Installer or python official website) and add python to system environment path, you can create a simple server.

    Open CMD -> cd to the html file location. input cmd python -m http.server

    Then you will see:

    enter image description here

    open http://localhost:8000 in your browser ->open the html file -> click launch app.

    Best regards,

    Minxin Yu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.