douyao1856 2015-03-24 15:27
浏览 49
已采纳

操作系统中的服务列表-Golang

How can I get the list of currently installed services in golang under Windows?

I need something like:

List of currently running process in golang

but for services and not process.

  • 写回答

2条回答 默认 最新

  • dongyizhuang0134 2015-03-24 20:43
    关注

    There is no such function in the standard library and there will likely never be.

    Consider using one of the functions in os/exec to launch a Windows program that will list the available services and parse its output (e.g. "sc query state=all").

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?