Fix LGHUB backup
This commit is contained in:
parent
e0fd6a6de7
commit
f9020e3e72
1 changed files with 2 additions and 2 deletions
|
@ -8,9 +8,9 @@ $null = New-Module {
|
||||||
$hubName = "lghub.exe";
|
$hubName = "lghub.exe";
|
||||||
$mainProcesses = Get-Process | Where-Object { [System.IO.Path]::GetFileName($_.Path) -eq "$hubName" };
|
$mainProcesses = Get-Process | Where-Object { [System.IO.Path]::GetFileName($_.Path) -eq "$hubName" };
|
||||||
$lghub = $mainProcesses[0].Path;
|
$lghub = $mainProcesses[0].Path;
|
||||||
$hubProcesses = ($mainProcesses + (Get-Process | Where-Object { @("$hubName", "lghub_agent.exe", "lghub_system_tray.exe") -contains [System.IO.Path]::GetFileName($_.Path) }));
|
$hubProcesses = ($mainProcesses + (Get-Process | Where-Object { @("$hubName", "lghub_", "lghub_system_tray.exe") -contains [System.IO.Path]::GetFileName($_.Path) }));
|
||||||
$hubProcesses | Foreach-Object { $_.Kill() };
|
$hubProcesses | Foreach-Object { $_.Kill() };
|
||||||
$context.Backup($path, $context.SoftwareArchive($softwareName), @("-i!settings.db*", "-i!icon_cache"));
|
$context.Backup($path, $context.SoftwareArchive($softwareName), @("-i!settings.db", "-i!icon_cache"));
|
||||||
|
|
||||||
if ($lghub) {
|
if ($lghub) {
|
||||||
& "$lghub";
|
& "$lghub";
|
||||||
|
|
Loading…
Reference in a new issue