zoukankan      html  css  js  c++  java
  • 从浏览器启动应用程序

    package main

    import (
    "fmt"
    "time"
    )

    func main() {
    for {
    fmt.Println(time.Now())
    time.Sleep(16 * time.Second)
    }
    }

    go build -o MyApp.exe
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Title</title>
    </head>
    <body>
    <a href="MyApp://">A</a>
    </body>
    </html>

     注册表:MyApp.reg

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOTMyApp]
    @="Open MyApp"
    "URL Protocol"=""

    [HKEY_CLASSES_ROOTMyAppshell]

    [HKEY_CLASSES_ROOTMyAppshellopen]

    [HKEY_CLASSES_ROOTMyAppshellopencommand]
    @=""D:\test\a\MyApp.exe""

    从浏览器启动应用程序 - Application URL - Ldlchina - 博客园 https://www.cnblogs.com/ldlchina/p/5045950.html

     windows 用浏览器打开应用程序的方法_du_peiduo的专栏-CSDN博客_浏览器打开应用 https://blog.csdn.net/nothing_is_imposible/article/details/80405361

    上面的 reg 文件编写原理其实就是参照能通过浏览器打开的程序的注册表修改的(比如:迅雷应用程序,win 键 + R > 输入 regedit 在注册表找到对应程序,导出即可)

  • 相关阅读:
    Linux基础:Day05
    Linux基础:Day04
    Linux用户和用户组管理
    Linux基础:Day03
    Linux基础:Day02
    Linux基础:Day01
    Shell:Day10
    shell概述和shell脚本执行方式
    fdisk分区
    文件系统常用命令
  • 原文地址:https://www.cnblogs.com/rsapaper/p/15338902.html
Copyright © 2011-2022 走看看