Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WEB: Launch executable from browser

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.

like image 729
Mine_Stone Avatar asked Jul 27 '26 08:07

Mine_Stone


1 Answers

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.

like image 82
Jean-Bernard Pellerin Avatar answered Jul 28 '26 20:07

Jean-Bernard Pellerin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!