Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package/AgentWindowsManaged/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,8 @@ static void Main()
ThirdFailureActionType = FailureActionType.restart,
RestartServiceDelayInSeconds = 900,
ResetPeriodInDays = 1,
RemoveOn = SvcEvent.Uninstall,
StopOn = SvcEvent.InstallUninstall,
RemoveOn = SvcEvent.Uninstall_Wait,
StopOn = SvcEvent.InstallUninstall_Wait,
},
},
new (Features.SESSION_FEATURE, DevolutionsSession)
Expand Down
21 changes: 21 additions & 0 deletions package/chocolatey/agent/devolutionsagent.template.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>devo-agent</id>
<title>Devolutions Agent</title>
<version>$VAR1$</version>
<authors>Devolutions Inc.</authors>
<summary>A companion agent for managing and securing remote connections.</summary>
<description>Devolutions Agent is a versatile background process used by many Devolutions products to perform various remote management tasks.</description>
<projectUrl>https://devolutions.net/agent/</projectUrl>
<tags>devolutions devoagent Agent Jump RemoteDesktopManager remote desktop manager rdp</tags>
<copyright>Copyright © 2006-2026</copyright>
<licenseUrl>https://cdn.devolutions.net/documents/legal/eula/software-license-agreement-en.pdf</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<iconUrl>https://cdnweb.devolutions.net/images/chocolatey/DevolutionsAgent.png</iconUrl>
</metadata>
<files>
<file src="tools\chocolateyInstall.ps1" target="tools" />
<file src="tools\chocolateyUninstall.ps1" target="tools" />
</files>
</package>
16 changes: 16 additions & 0 deletions package/chocolatey/agent/tools/chocolateyInstall.template.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$ErrorActionPreference = 'Stop'

$PackageName = 'devo-agent'
$Url = 'https://cdn.devolutions.net/download/DevolutionsAgent-x86_64-$VAR1$.msi'

$PackageArgs = @{
packageName = $PackageName
url = $Url
fileType = 'msi'
silentArgs = "/qn /norestart"
validExitCodes= @(0, 1641, 3010, 1707)
checksum = '$VAR2$'
checksumType = 'sha256'
}

Install-ChocolateyPackage @PackageArgs
31 changes: 31 additions & 0 deletions package/chocolatey/agent/tools/chocolateyUninstall.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
$ErrorActionPreference = 'Stop'

$PackageName = 'devo-agent'

$PackageArgs = @{
packageName = $PackageName
softwareName = 'Devolutions Agent'
fileType = 'msi'
silentArgs = "/qn /norestart"
validExitCodes= @(0, 3010, 1605, 1614, 1641, 1707)
}

[array]$Key = Get-UninstallRegistryKey -SoftwareName $PackageArgs['softwareName']

if ($Key.Count -eq 1) {
$Key | % {
if ($_.UninstallString -match '(\{[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}\})') {
$PackageArgs['silentArgs'] = "$($Matches[1]) $($PackageArgs['silentArgs'])"
Uninstall-ChocolateyPackage @PackageArgs
} else {
Write-Warning "Invalid uninstall string ($($_.UninstallString))."
}
}
} elseif ($Key.Count -eq 0) {
Write-Warning "$PackageName has already been uninstalled."
} elseif ($Key.Count -gt 1) {
Write-Warning "$($Key.Count) matches found!"
Write-Warning "To prevent accidental data loss, no programs will be uninstalled."
Write-Warning "The following keys were matched:"
$Key | % {Write-Warning "- $($_.DisplayName)"}
}