diff --git a/OpenVpnService.csproj b/OpenVpnService.csproj
index dbca54d..7a8412c 100644
--- a/OpenVpnService.csproj
+++ b/OpenVpnService.csproj
@@ -25,11 +25,11 @@
false
true
0
- 1.3.0.%2a
+ 1.4.0.%2a
false
false
true
- 1.3.0.0
+ 1.4.0.0
OpenVpn.OpenVpnService
diff --git a/ProjectInstaller.Designer.cs b/ProjectInstaller.Designer.cs
index c70ff5d..cd7a928 100644
--- a/ProjectInstaller.Designer.cs
+++ b/ProjectInstaller.Designer.cs
@@ -43,7 +43,7 @@ private void InitializeComponent()
this.serviceInstaller.ServicesDependedOn = new string[] {
"Dhcp",
"tap0901"};
- this.serviceInstaller.StartType = System.ServiceProcess.ServiceStartMode.Manual;
+ this.serviceInstaller.StartType = System.ServiceProcess.ServiceStartMode.Automatic;
//
// ProjectInstaller
//
diff --git a/Service.cs b/Service.cs
index 451c223..19766eb 100644
--- a/Service.cs
+++ b/Service.cs
@@ -97,7 +97,7 @@ protected override void OnStart(string[] args)
var config = new OpenVpnServiceConfiguration()
{
exePath = (string)rkOvpn.GetValue("exe_path"),
- configDir = (string)rkOvpn.GetValue("config_dir"),
+ configDir = (string)rkOvpn.GetValue("autostart_config_dir"),
configExt = "." + (string)rkOvpn.GetValue("config_ext"),
logDir = (string)rkOvpn.GetValue("log_dir"),
logAppend = append,
@@ -106,7 +106,7 @@ protected override void OnStart(string[] args)
eventLog = EventLog,
};
- if (configDirsConsidered.Contains(config.configDir)) {
+ if (String.IsNullOrEmpty(config.configDir) || configDirsConsidered.Contains(config.configDir)) {
continue;
}
configDirsConsidered.Add(config.configDir);