Skip to content

Cmd popups when I use exec, -ldflags -H=windowsgui not effective #1734

Answered by sithembiso
sithembiso asked this question in Q&A
Discussion options

You must be logged in to vote

These options on Windows saved the day:

cmd := exec.Command("app.exe")
cmd.SysProcAttr = &syscall.SysProcAttr{
	HideWindow:    true,
	CreationFlags: 0x08000000,
}
cmd.Start()

Source: https://stackoverflow.com/a/48365926/789655

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@sithembiso
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sithembiso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants