Back to / windows / svc / example

Command example

Latest Go to latest

The latest major version is .

Published: Apr 12, 2019 | License: BSD-3-Clause | Module:


Example service program that beeps.

The program demonstrates how to create Windows service and install / remove it on a computer. It also shows how to stop / start / pause / continue any service, and how to write to event log. It also shows how to use debug facilities available in debug package.


  • MessageBeep Windows api is broken on Windows 7, so this example does not beep when runs as service on Windows 7.

Documentation was rendered with GOOS=windows and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier