Development discussion of WireGuard
 help / color / mirror / Atom feed
* wireguard.exe no MessageBox option?
@ 2021-05-13 23:18 Andrew Burkett
  2021-05-14 15:15 ` Jonny Proud
  2021-05-17 15:07 ` Jason A. Donenfeld
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Burkett @ 2021-05-13 23:18 UTC (permalink / raw)
  To: wireguard

Would it be possible to add an option to wireguard.exe to output the
return message for the /install* and /uninstall* commands either to
stdout/stderr or a logfile? It would make it a bit easier to script
installation/management to not have to worry about a MessageBox
popping up with an error.

Thanks for the great software.

Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: wireguard.exe no MessageBox option?
  2021-05-13 23:18 wireguard.exe no MessageBox option? Andrew Burkett
@ 2021-05-14 15:15 ` Jonny Proud
  2021-05-17 15:07 ` Jason A. Donenfeld
  1 sibling, 0 replies; 3+ messages in thread
From: Jonny Proud @ 2021-05-14 15:15 UTC (permalink / raw)
  To: Andrew Burkett, wireguard

Hi Andrew,

This would be a great idea for deployments using SCCM or SCCM like tools.

It would be best if the installer had a silent install argument 
(/silent), and then depending on the outcome of the install would change 
the exit code of the process. Then you can check the returned exit code 
from the installer process.

Example codes;
0 - Successful
1 - Known Error 1
2 - Known Error 2
3010 - A reboot is required to complete the install.
and so on.

Then a /log "c:\path\to\file.log" argument to output the installation log


Jonny Proud
On 14/05/2021 00:18, Andrew Burkett wrote:
> Would it be possible to add an option to wireguard.exe to output the
> return message for the /install* and /uninstall* commands either to
> stdout/stderr or a logfile? It would make it a bit easier to script
> installation/management to not have to worry about a MessageBox
> popping up with an error.
> 
> Thanks for the great software.
> 
> Andrew
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: wireguard.exe no MessageBox option?
  2021-05-13 23:18 wireguard.exe no MessageBox option? Andrew Burkett
  2021-05-14 15:15 ` Jonny Proud
@ 2021-05-17 15:07 ` Jason A. Donenfeld
  1 sibling, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2021-05-17 15:07 UTC (permalink / raw)
  To: Andrew Burkett; +Cc: WireGuard mailing list

Hi Andrew,

It's a bit tricky, because UI apps are treated differently than
console apps: cmd.exe won't wait for them to complete, and they get
empty stdio handles. But I've used the latter property to detect
what's up and hopefully achieve some kind of compromise. Let me know
if this commit does the trick:

https://git.zx2c4.com/wireguard-windows/commit/?id=ed59b1b2e834b6d35b11bab63551b21bc60d7f35

Basically, if stderr is available, logs go there. Otherwise if stdout
is available, logs go there. Otherwise errors show in a message box.

So this should allow you to do things like:

wireguard /installtunnelservice ... 2>C:\path\to\log.txt

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-17 15:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 23:18 wireguard.exe no MessageBox option? Andrew Burkett
2021-05-14 15:15 ` Jonny Proud
2021-05-17 15:07 ` Jason A. Donenfeld

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git