title: How to hide command prompt window when using Exec in Golang?
body: <p>say i have the following code, using <code>syscall</code> to hide command line window</p>
  
  <pre class="lang-golang prettyprint-override"><code>process := exec.Command(name, args...)
  process.SysProcAttr = &amp;syscall.SysProcAttr{HideWindow: true}
  err := process.Start()
  if err != nil {
      log.Print(err)
  }
  </code></pre>
  
  <p>but when i compiled it and tried to run it in Windows, command line window showed up again</p>
  
  <p>what can i do to prevent command line window from appearing?</p>
  
  <p>PS i already know how to compile golang source into a Windows GUI executable using <code>go build -ldflags -H=windowsgui</code>, but doing so only ensures the program itself doesn't bring up a command line window, <code>Exec</code> will show those windows anyway</p>