app URI
An app Uniform Resource Identifier launches an app from a URL.
this can be useful if an app wants to open another app.
e.g. clicking calculator:// opens the calculator on Windows
use cases¶
- logseq uses this to link to other graphs: interwikilinks plugin
- obsidian URI also supports this
works on Linux, Windows, Android …
also allows opening apps from your browser. great for tutorials
slow command to print all registered URIs reg query HKCR /s /f "URL Protocol" /c
This very slow command lists all URIs found in the registry on Windows:
there’s an official list of URIs, so when adding a new one check it’s not already in use.
App URI is similar to COM dispatch
custom app URI¶
from a stackoverflow answer
RegistryKey key;
key = Registry.ClassesRoot.CreateSubKey("foo");
key.SetValue("", "URL: Foo Protocol");
key.SetValue("URL Protocol","");
key = key.CreateSubKey("shell");
key = key.CreateSubKey("open");
key = key.CreateSubKey("command");
key.SetValue("", "C:\\oggsplit.exe");
AI translated to powershell, not yet tested.
believe this needs to run in elevated mode
New-Item -Path "HKEYCLASSESROOT\foo"
Set-ItemProperty -Path "HKEYCLASSESROOT\foo" -Name "" -Value "URL: Foo Protocol"
Set-ItemProperty -Path "HKEYCLASSESROOT\foo" -Name "URL Protocol" -Value ""
New-Item -Path "HKEYCLASSESROOT\foo\shell\open\command"
Set-ItemProperty -Path "HKEYCLASSESROOT\foo\shell\open\command" -Name "" -Value "C:\oggsplit.exe".
```python
import registry
key = registry.ClassesRoot.OpenSubKey("mycalc")
key.SetValue("", "URL: Foo Protocol")
key.SetValue("URL Protocol", "")
key = key.CreateSubKey("shell")
key = key.CreateSubKey("open")
key = key.CreateSubKey("command")
key.SetValue("", "calc")
Backlinks¶
- interwikilinks plugin
- Unity deeplink RnD
- Blender - install addon from repo
- instead i want to just copy paste a URL, and click install
- deep link
- similar to app URI
- link Obsidian to Unity
- Unity supports app URI via
unityhub://
but does not have built-in direct file-opening support.
- Unity supports app URI via