diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2016-09-15 15:39:19 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2016-09-15 15:39:19 +0300 |
commit | afa9924f30f659b7581678d6140b81148ec53ddb (patch) | |
tree | a262ff166b0dc154c40cbdd88f2f7879a15cf8e5 /Duplicati/Service | |
parent | 1d43227813af7187cda9746bffb40834c28f75d2 (diff) |
Made the WindowsService self-installable with parameter support.
This fixes #1768
Diffstat (limited to 'Duplicati/Service')
-rw-r--r-- | Duplicati/Service/Runner.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Duplicati/Service/Runner.cs b/Duplicati/Service/Runner.cs index 49a33a5ba..3eebff185 100644 --- a/Duplicati/Service/Runner.cs +++ b/Duplicati/Service/Runner.cs @@ -55,13 +55,9 @@ namespace Duplicati.Service var self_exec = System.Reflection.Assembly.GetExecutingAssembly().Location;
var path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
var exec = System.IO.Path.Combine(path, "Duplicati.Server.exe");
- var cmdargs = Environment.CommandLine + " --ping-pong-keepalive=true";
+ var cmdargs = "--ping-pong-keepalive=true";
if (m_cmdargs != null && m_cmdargs.Length > 0)
- cmdargs = cmdargs + string.Join(" ", m_cmdargs);
-
- if (cmdargs.StartsWith(self_exec))
- cmdargs = cmdargs.Substring(self_exec.Length);
-
+ cmdargs = cmdargs + " " + string.Join(" ", m_cmdargs);
var firstRun = true;
var startAttempts = 0;
|