在Go语言中从Windows启动一个进程

huangapple go评论82阅读模式
英文:

Starting a process on Windows from Go

问题

有没有可能从Google Go启动一个Windows进程?我正在寻找一个Go包,其中包含类似于C# System.Process类型的东西,或者一些实现相同结果的替代方法。

英文:

Is it possible to start a windows process from Google Go? I´m looking for a Go package that contains something similar to C# System.Process type, or some alternative method of achieving the same result.

答案1

得分: 6

Go还有一个Process类型。您可以使用os包的StartProcess函数创建一个新的进程。或者,您也可以使用os/exec包的Cmd结构,这样会更容易使用。

英文:

Go has also a Process type. You can use the StartProcess function of the os package to create a new one. Alternatively, you can also use the Cmd struct of the os/exec package which is a bit easier to use.

huangapple
  • 本文由 发表于 2012年2月2日 17:30:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/9109902.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定