- reg 注册信息
不要出现空行,否则会导致报不是二进制文件的错误
// 新建word.reg注册表文件(可以使用vscode进行编辑,安装reg插件来提供一些小提示)
Windows Registry Editor Version 5.00 // 注册表工具的版本信息
[HKEY_CLASSES_ROOT\word]
@="word" // 协议的名称
"URL Protocol"="D:\\software\\WPS Office\\10.1.0.7521\\office6\\wps.exe" // 可应用程序的路径,只能是exe的程序
[HKEY_CLASSES_ROOT\word\DefaultIcon]
@="D:\\software\\WPS Office\\10.1.0.7521\\office6\\wps.exe,1"
[HKEY_CLASSES_ROOT\word\shell]
@="open"
[HKEY_CLASSES_ROOT\word\shell\open]
@="open"
[HKEY_CLASSES_ROOT\word\shell\open\command]
@="\"D:\\software\\WPS Office\\10.1.0.7521\\office6\\wps.exe\" \"%1\"" // 应用程序路径,%1表示参数
- html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<a href="word:">打开word</a>
</body>
</html>
-转载自 https://blog.youkuaiyun.com/roamingcode/article/details/83785368