现在很多程序需在BS激活CS程序,像qq等软件。
需要配合注册表一起使用,其中配置注册表 容易配置错误导致运行不起来。
注册表配置:
1.在注册表HKEY_CLASSES_ROOT下添加自定义项 jlxxxx
a.将jlxxxx的(默认)相的值改成jlxxxx,另外添加变量 URL Protocol 值为空 都可以(重要);
2.在jlxxxx下添加项shell
3.在shell下添加项open;
4.在open下添加command;
5.修改command的默认值为 "程序地址" "%1"
截图示例:
通过入口程序获取参数:
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1(args[0]));
}