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_ROOT\MyApp]

@="Open MyApp"

"URL Protocol"=""

[HKEY_CLASSES_ROOT\MyApp\shell]

[HKEY_CLASSES_ROOT\MyApp\shell\open]

[HKEY_CLASSES_ROOT\MyApp\shell\open\command]

@="\"D:\\test\\a\\MyApp.exe\""