Skip to content

Commit

Permalink
Install RustDesk service
Browse files Browse the repository at this point in the history
And uninstall/reinstall during upgrade

For #58
  • Loading branch information
bdukes committed Sep 23, 2024
1 parent 5ebc010 commit 9cfa657
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions automatic/rustdesk.install/tools/chocolateyBeforeModify.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
$ErrorActionPreference = 'Stop';

$installedPath = 'C:\Program Files\RustDesk\RustDesk.exe';
if (Test-Path $installedPath) {
& $installedPath --uninstall-service;
}
5 changes: 5 additions & 0 deletions automatic/rustdesk.install/tools/chocolateyinstall.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ $packageArgs = @{
}

Install-ChocolateyPackage @packageArgs;

$installedPath = 'C:\Program Files\RustDesk\RustDesk.exe';
if (Test-Path $installedPath) {
& $installedPath --install-service;
}

0 comments on commit 9cfa657

Please sign in to comment.