]> git.ipfire.org Git - thirdparty/openvpn.git/commit
win: replace wmic invocation with powershell
authorLev Stipakov <lev@openvpn.net>
Mon, 15 Sep 2025 06:20:06 +0000 (08:20 +0200)
committerGert Doering <gert@greenie.muc.de>
Mon, 15 Sep 2025 06:52:53 +0000 (08:52 +0200)
commitd383d6ed6270b8d1f95716d08e9da3dd0d712f2d
tree33845021923c596f56f540b6a685ac8d41b0189c
parent520a58d51fc53909d7e05ddf2a2da62eab439be3
win: replace wmic invocation with powershell

Since wmic has been recently deprecated and is absent on new
systems, replace setting DNS domain "old-style" with powershell.

Some changes to the service implementation:

 - remove action parameter and hardcode Set-DnsClient since this is
 the only used action

 - remove support of multiple domains, since we only pass a single domain
 (tuntap_options.domain)

Github: fixes OpenVPN/openvpn#642

Change-Id: Iff2f4ea677fe2d88659d7814dab0f792f5004fb3
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1183
Signed-off-by: Lev Stipakov <lev@openvpn.net>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20250915062013.2555-1-gert@greenie.muc.de>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg32938.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/tun.c
src/openvpn/win32.h
src/openvpnserv/interactive.c