title: Launch application from URI - VB.NET
body: <p>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 <code>roblox://</code> 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.</p>
  
  <p>The code I used is:</p>
  
  <pre><code>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("", """" &amp; Application.ExecutablePath &amp; """" &amp; " -id " &amp; """" &amp; "%1" &amp; """")
  
      warnText.Text = "ROBLOX Protocol Launcher is installed!"
  Else
      warnText.Text = "Please run ROBLOX Protocol Launcher as Administrator to finish the install process."
  End If
  </code></pre>
  
  <p>If I look in the Registry using <code>regedit</code>, the keys are there (the ones I registered were the ones from <a href="http://msdn.microsoft.com/en-us/library/aa767914%28v=vs.85%29.aspx" rel="nofollow">this article</a>), it just doesn't seem to be launching. I tried after restarting my computer and it still doesn't.</p>