Reputation: 437
Ive searched a lot of docs maybe im just not reading the right ones. I want to create a custom url scheme that opens a specified path so i.e. customSheme://desktop/videoFile.mov and have the default application open the file.
Upvotes: 0
Views: 1267
Reputation: 1600
Open notepad and paste the code below into it. Change "YourApp" into your app's name. Save it to YourApp.reg and execute it by clicking on it in explorer. YourApp Protocol is the name of your protocol.
REGEDIT4
[HKEY_CLASSES_ROOT\YourApp]
@="URL:YourApp Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\YourApp\DefaultIcon]
@="\"C:\\Program Files\\YourApp\\YourApp.exe\""
[HKEY_CLASSES_ROOT\YourApp\shell]
[HKEY_CLASSES_ROOT\YourApp\shell\open]
[HKEY_CLASSES_ROOT\YourApp\shell\open\command]
@="\"C:\\Program Files\\YourApp\\YourApp.exe\" \"%1\" \"%2\" \"%3\" \"%4\" \"%5\" \"%6\" \"%7\" \"%8\" \"%9\""
This is kind of dodgy and unofficial. You're not really MEANT to do this. These things are supposed to be officially registered https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml You can do a lot with the existing URI schemes, you might be able to find another way to solve this.
Upvotes: 1