aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/embeddable-dll-service/csharp/Service.cs
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-10-10 21:37:49 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-10-10 21:37:49 +0200
commitdb4d5460a82f8e22cf0cc3e24f5d1c39e215eff0 (patch)
tree0153bee7cb5211e33cc4f01cd0d809bb8e168929 /embeddable-dll-service/csharp/Service.cs
parentRevert "tunnel: check for endpoint interfaces and media connection state" (diff)
downloadwireguard-windows-db4d5460a82f8e22cf0cc3e24f5d1c39e215eff0.tar.xz
wireguard-windows-db4d5460a82f8e22cf0cc3e24f5d1c39e215eff0.zip
embeddable-dll-service: use on-demand activation instead of auto
This prevents this from coming back after boot, since we probably want it tied to the parent process. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r--embeddable-dll-service/csharp/Service.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/embeddable-dll-service/csharp/Service.cs b/embeddable-dll-service/csharp/Service.cs
index 4ad9fe47..db600819 100644
--- a/embeddable-dll-service/csharp/Service.cs
+++ b/embeddable-dll-service/csharp/Service.cs
@@ -51,7 +51,7 @@ namespace Tunnel
Win32.CloseServiceHandle(service);
Remove(configFile);
}
- service = Win32.CreateService(scm, shortName, longName, Win32.ServiceAccessRights.AllAccess, Win32.ServiceType.Win32OwnProcess, Win32.ServiceStartType.Auto, Win32.ServiceError.Normal, pathAndArgs, null, IntPtr.Zero, "Nsi", null, null);
+ service = Win32.CreateService(scm, shortName, longName, Win32.ServiceAccessRights.AllAccess, Win32.ServiceType.Win32OwnProcess, Win32.ServiceStartType.Demand, Win32.ServiceError.Normal, pathAndArgs, null, IntPtr.Zero, "Nsi", null, null);
if (service == IntPtr.Zero)
throw new Win32Exception(Marshal.GetLastWin32Error());
try