Reputation: 19
Access desktop application(software) through URL? I thought of creating a simple application using visual studio of creating active x like the following: https://blogs.msdn.microsoft.com/asiatech/2011/12/05/how-to-develop-and-deploy-activex-control-in-c/
Upvotes: 0
Views: 1287
Reputation:
For accessing apps through url's you have to register your app for the specific URL like this:
public void RegisterURLProtocol(string protocolName, string applicationPath, string description)
{
// Create new Key for URL Protocol
RegistryKey myKey=Registry.ClassesRoot.CreateSubKey(protocolName);
// Assign Protocol
myKey.SetValue(null, description);
myKey.SetValue("URL Protocol", string.Empty);
// Assign Shell Values
Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell");
Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open");
myKey = Registry.ClassesRoot.CreateSubKey(protocolName + "\\Shell\\open\\command");
// Determine App who's receiving the URL calls with params
myKey.SetValue(null, "\"" + applicationPath, + "\" %1");
}
Have a nice day
Upvotes: 1