Skip to content

Commit bde4d5e

Browse files
committed
Put quotes around path to server config file for boot task
1 parent 18ca5e1 commit bde4d5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

WgServerforWindows/Models/NewNetIpAddressTaskSubCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void Resolve(string serverDataPath)
4444

4545
// Create/update a Scheduled Task that sets the NetIPAddress on boot.
4646
TaskDefinition td = TaskService.Instance.NewTask();
47-
td.Actions.Add(new ExecAction(Path.Combine(AppContext.BaseDirectory, "ws4w.exe"), $"{typeof(SetNetIpAddressCommand).GetVerb()} --{typeof(SetNetIpAddressCommand).GetOption(nameof(SetNetIpAddressCommand.ServerDataPath))} {serverDataPath ?? ServerConfigurationPrerequisite.ServerDataPath}"));
47+
td.Actions.Add(new ExecAction(Path.Combine(AppContext.BaseDirectory, "ws4w.exe"), $"{typeof(SetNetIpAddressCommand).GetVerb()} --{typeof(SetNetIpAddressCommand).GetOption(nameof(SetNetIpAddressCommand.ServerDataPath))} \"{serverDataPath ?? ServerConfigurationPrerequisite.ServerDataPath}\""));
4848
td.Triggers.Add(new BootTrigger { Delay = GlobalAppSettings.Instance.BootTaskDelay + TimeSpan.FromSeconds(15) });
4949
TaskService.Instance.RootFolder.RegisterTaskDefinition(_netIpAddressTaskUniqueName, td, TaskCreation.CreateOrUpdate, "SYSTEM", null, TaskLogonType.ServiceAccount);
5050

0 commit comments

Comments
 (0)