Discover Packages
github.com/hkloudou/goWindowsService
command
module
Version:
v0.0.0-...-c5cff33
Opens a new window with list of versions in this module.
Published: Sep 16, 2020
License: BSD-3-Clause
Opens a new window with license information.
Imports: 13
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
goWindowsService
what we do?
Step1.Run Service as SYSTEM
Step2.Run app.exe(config.go) as an administrator(current user) when your system startup
1.Star this project ,haha
2.clone to your workspace
go get github.com/hkloudou/goWindowsService
3.config.go
package main
var serviceName = "Your Service Name"
var serviceDisplayName = "Your ServiceDisplayName"
var serviceDescription = "https://github.com/hkloudou/goWindowsService"
var appPath = "app.exe" // your app path
4.build
windows(recommend)
go install github.com/akavel/rsrc
run build.bat
mac
brew install mingw-w64
env CGO_ENABLED=1 GOOS=windows GOARCH=386 CC=i686-w64-mingw32-gcc go build -ldflags="-w -s" -o output/service.exe
5.copy
copy your allpication "app.exe"(same as config.go) to output dictionary
pack your output directory as a zip
run output/install.bat
TIP: add -ldflags="-w -s -H windowsgui" to build windowless app when you biuld your own app.exe.
LINKS
https://gist.github.com/LiamHaworth/1ac37f7fb6018293fc43f86993db24fc
https://github.com/joesilva01862/ScreenshotWindowsService
https://github.com/akavel/rsrc
github.com/kardianos/service
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.