diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index ba347e294..40b68b520 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -224,7 +224,10 @@ class Context { } [void] AddNextcloudSync([string] $localPath, [string] $targetPath, [bool] $virtualFiles) { - $pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)" + $pattern = "^\d+\\Folders(?:WithPlaceholders)?\\(\d+)"; + $nextcloudProcess = Get-Process nextcloud; + $nextcloudPath = $nextcloudProcess.Path; + $nextcloudProcess | Stop-Process -Force; $folderID = ( Get-Content $($this.GetNextcloudConfigFile()) | ` @@ -243,6 +246,8 @@ class Context { @( "0\$configName\$folderID\localPath=$localPath", "0\$configName\$folderID\targetPath=$targetPath")); + + Start-Process $nextcloudPath; } [void] Reboot() {