3

I was wondering how Roblox (website) manages to launch the roblox executable from their website: when you chose a game and press "play", my browser (chrome) asks me if I want to launch an application, and shows me the path. When I press "Launch App", it launches the roblox client which is on my computer.

0

1 Answer 1

6

For windows, you'd register an application to a uri scheme

Basically just set up a few registry keys and point them to your executable. The best place to set this up is in your installer.

These are the keys you would set:

HKEY_CLASSES_ROOT
   Roblox
      (Default) = "URL:Roblox Launcher"
      URL Protocol = ""
      DefaultIcon
         (Default) = "roblox.exe,1"
      shell
         open
            command
               (Default) = "C:\Program Files\Roblox\roblox.exe" "%1"

Then from your website you could link to roblox:Hello%20World, which would launch your application as if the user had entered "C:\Program Files\Roblox\roblox.exe" "roblox:Hello World" on the command line.

Sign up to request clarification or add additional context in comments.

4 Comments

What would the launch button look like? I read the article. You register the scheme, from what it looks like, by making an entry in the registry for it, but what "kicks it off" on the client side?
@ShanerM13 <a href="roblox:Hello%20World">launch me</a>
Extra question: I suppose the means of setting said keys would be to... 1. put the keys in a file.reg. 2. go to the registry. 3. select HKEY_CLASSES_ROOT. 4. import the registry file. ?
Usually in the installer for the application being launched. Otherwise you'd have to make a small app or script for the user to run. A .reg file can also work, but privileges for that might be complicated, I'm not sure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.