문제

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.

도움이 되었습니까?

해결책

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://

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top