3

アプリケーションがゲームを起動するためのプロトコルを作成しようとしましたが、URI から実際に起動するのに問題があるようです。使用しようとしているプロトコルですroblox://が、入力してもアプリケーションが起動しないようです。Windows は、URL を起動するアプリが見つからないことを通知します。

私が使用したコードは次のとおりです。

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

を使用してレジストリを調べるとregedit、キーはそこにあります (私が登録したものはこの記事のものでした)、起動していないようです。コンピューターを再起動した後に試しましたが、まだうまくいきません。

4

1 に答える 1