aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/embeddable-dll-service
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
commitf1ad66717ba1c406b4cf4e226dc097f5bad40b50 (patch)
tree0153bee7cb5211e33cc4f01cd0d809bb8e168929 /embeddable-dll-service
parentRevert "tunnel: check for endpoint interfaces and media connection state" (diff)
downloadwireguard-windows-f1ad66717ba1c406b4cf4e226dc097f5bad40b50.tar.xz
wireguard-windows-f1ad66717ba1c406b4cf4e226dc097f5bad40b50.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.
Diffstat (limited to 'embeddable-dll-service')
-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