Skip to content

Instantly share code, notes, and snippets.

@Anton-go
Anton-go / README.md
Created April 29, 2021 16:02 — forked from KatelynHaworth/README.md
Reproduction code for golang/go#35314

Reproduction code for golang/go#35314

This gist contains example code to reproduce golang/go#35314, due to the privilege requirements of DuplicateTokenEx the code is designed to run as a service which then spawns a child process and logs the output of the child process to the Windows event log.

Written for go 1.13.4

Running the code

@Anton-go
Anton-go / main.go
Created April 28, 2021 13:26 — forked from KatelynHaworth/main.go
Example of run an interactive process on the current user from system service on windows (Golang)
package main
import (
"github.com/kardianos/service"
"log"
"flag"
)
type Service struct {}
@Anton-go
Anton-go / main.go
Created April 28, 2021 13:22 — forked from mholt/main.go
Example of run an interactive process on the current user from system service on windows (Golang)
package main
import (
"github.com/kardianos/service"
"log"
"flag"
)
type Service struct {}