Reputation: 1145
I have tried to create a protocol for my application to launch a game, but I seem to be having trouble actually launching it from a URI. The protocol I'm trying to use is roblox://
but if I type it in, it doesn't seem to launch the application, Windows tells me it can't find an app to launch the URL.
The code I used is:
If (My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator)) Then
Dim newRegKey As RegistryKey
newRegKey = Registry.ClassesRoot.CreateSubKey("RobloxProtocol", RegistryKeyPermissionCheck.ReadWriteSubTree)
newRegKey.SetValue("", "URL:roblox")
newRegKey.SetValue("URL Protocol", "")
Dim newRegCom As RegistryKey
newRegCom = newRegKey.CreateSubKey("shell\open\command")
newRegCom.SetValue("", """" & Application.ExecutablePath & """" & " -id " & """" & "%1" & """")
warnText.Text = "ROBLOX Protocol Launcher is installed!"
Else
warnText.Text = "Please run ROBLOX Protocol Launcher as Administrator to finish the install process."
End If
If I look in the Registry using regedit
, the keys are there (the ones I registered were the ones from this article), it just doesn't seem to be launching. I tried after restarting my computer and it still doesn't.
Upvotes: 3
Views: 1520
Reputation: 41569
In the article you reference, the subkey name was alert
under HKCR, where the url to launch from is alert://...
.
Change your subkey to roblox
instead of RobloxProtocol
(or try launching from robloxprotocol://
Upvotes: 3