When I tried this sample (with some customization), the service instantly failed but if remove "is" "auto-started", it works. That would make sense because: https://github.com/golang/sys/blob/master/windows/svc/mgr/mgr.go states this would be extra arguments.
Proposing to remove those from the sample.
Timothy
Daniel Theophanes
unread,
Dec 29, 2015, 5:15:00 PM12/29/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi Timothy,
I think the example works just fine. Having arguments for the installer is working as intended. If you'd like a simpler (slightly less powerful) API, there are two wrappers I've made around the windows/svc packages:
Do you think your program is crashing when it receives arguments it isn't expecting?
Timothy Dewin
unread,
Dec 30, 2015, 4:22:43 AM12/30/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi,
You are right, it works fine in this sample. I see now that the main instantly starts the service if it find that the session is not interactive and thus ignore any arguments.