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
28 changes: 18 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
# Run checks
- run: cargo check
- run: cargo fmt -- --check
- run:
name: Lint PowerShell installer scripts (PSScriptAnalyzer)
shell: powershell.exe
command: .\installer\windows\Run-Lint.ps1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: could you clarify in the README how to launch it in local dev env ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot can you add the demands from the comment on the code ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@damgouj we added it :)
Thank you for the review !

- run: cargo build --release
- run: cargo test --release
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand Down Expand Up @@ -81,7 +85,7 @@ jobs:
curl.exe --fail-with-body -u samuel.hassine@filigran.io:$env:JFROG_TOKEN -T ./installer/windows/agent-installer-service-user.ps1 "https://filigran.jfrog.io/artifactory/openaev-agent/windows/openaev-agent-installer-service-user-$env:version.ps1"
curl.exe --fail-with-body -u samuel.hassine@filigran.io:$env:JFROG_TOKEN -T ./installer/windows/agent-upgrade-service-user.ps1 "https://filigran.jfrog.io/artifactory/openaev-agent/windows/openaev-agent-upgrade-service-user-$env:version.ps1"
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand All @@ -108,12 +112,16 @@ jobs:
$env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH;
# Run checks
- run: $env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH; Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" check'
- run:
name: Lint PowerShell installer scripts (PSScriptAnalyzer)
shell: powershell.exe
command: .\installer\windows\Run-Lint.ps1
- run: git config --global --unset url.ssh://git@github.com.insteadOf
- run: git config --global url.ssh://git@github.com.insteadOf https://github.com/
- run: $env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH; Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" build --release'
- run: $env:PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\ARM64\bin;" + $env:PATH; Invoke-Expression '& "$env:USERPROFILE\.cargo\bin\cargo" test --release'
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand Down Expand Up @@ -172,7 +180,7 @@ jobs:
curl.exe --fail-with-body -u samuel.hassine@filigran.io:$env:JFROG_TOKEN -T ./installer/windows/agent-installer-service-user.ps1 "https://filigran.jfrog.io/artifactory/openaev-agent/windows/openaev-agent-installer-service-user-$env:version.ps1"
curl.exe --fail-with-body -u samuel.hassine@filigran.io:$env:JFROG_TOKEN -T ./installer/windows/agent-upgrade-service-user.ps1 "https://filigran.jfrog.io/artifactory/openaev-agent/windows/openaev-agent-upgrade-service-user-$env:version.ps1"
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand All @@ -197,7 +205,7 @@ jobs:
- run: . "$HOME/.cargo/env"; cargo test --release
- run: strip ./target/x86_64-unknown-linux-musl/release/openaev-agent
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand Down Expand Up @@ -231,7 +239,7 @@ jobs:
curl --fail-with-body -usamuel.hassine@filigran.io:$JFROG_TOKEN -T ./installer/linux/agent-installer-service-user.sh "https://filigran.jfrog.io/artifactory/openaev-agent/linux/openaev-agent-installer-service-user-$version.sh"
curl --fail-with-body -usamuel.hassine@filigran.io:$JFROG_TOKEN -T ./installer/linux/agent-upgrade-service-user.sh "https://filigran.jfrog.io/artifactory/openaev-agent/linux/openaev-agent-upgrade-service-user-$version.sh"
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand All @@ -257,7 +265,7 @@ jobs:
- run: . "$HOME/.cargo/env"; cargo test --release
- run: strip ./target/aarch64-unknown-linux-musl/release/openaev-agent
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand Down Expand Up @@ -292,7 +300,7 @@ jobs:
curl --fail-with-body -usamuel.hassine@filigran.io:$JFROG_TOKEN -T ./installer/linux/agent-installer-service-user.sh "https://filigran.jfrog.io/artifactory/openaev-agent/linux/openaev-agent-installer-service-user-$version.sh"
curl --fail-with-body -usamuel.hassine@filigran.io:$JFROG_TOKEN -T ./installer/linux/agent-upgrade-service-user.sh "https://filigran.jfrog.io/artifactory/openaev-agent/linux/openaev-agent-upgrade-service-user-$version.sh"
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand All @@ -315,7 +323,7 @@ jobs:
- run: . "$HOME/.cargo/env"; cargo test --release
- run: strip ./target/release/openaev-agent
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand Down Expand Up @@ -347,7 +355,7 @@ jobs:
curl --fail-with-body -usamuel.hassine@filigran.io:$JFROG_TOKEN -T ./installer/macos/agent-installer-service-user.sh "https://filigran.jfrog.io/artifactory/openaev-agent/macos/openaev-agent-installer-service-user-$version.sh"
curl --fail-with-body -usamuel.hassine@filigran.io:$JFROG_TOKEN -T ./installer/macos/agent-upgrade-service-user.sh "https://filigran.jfrog.io/artifactory/openaev-agent/macos/openaev-agent-upgrade-service-user-$version.sh"
- run: |
cargo install cargo-cache
cargo install --force cargo-cache
cargo-cache -a clean-unref
- save_cache:
key: cargo-{{ arch }}-{{ checksum "Cargo.toml" }}
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,22 @@ Audit is included in CI to block new vulnerabilities.

---

### PSScriptAnalyzer (Windows installer scripts)

The PowerShell installer scripts under `installer/windows/` are linted with [PSScriptAnalyzer](https://github.com/PowerShell/PSScriptAnalyzer).

Run the linter locally (requires PowerShell 5.1+ or PowerShell 7+):

```powershell
.\installer\windows\Run-Lint.ps1
```

The script will automatically install `PSScriptAnalyzer` from the PowerShell Gallery if it is not already present, then analyze every `.ps1` file in `installer/windows/` using the settings defined in `installer/windows/PSScriptAnalyzerSettings.psd1`.

PSScriptAnalyzer runs in CI — the pipeline will fail if any issues are reported.

---

## 🧪 Tests in CI

All tests are run automatically in the CI pipeline using:
Expand Down
11 changes: 11 additions & 0 deletions installer/windows/PSScriptAnalyzerSettings.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# PSScriptAnalyzer settings for the Windows installer scripts.
# Rules excluded here are intentional choices, not oversights:
# - Write-Host is used deliberately for interactive console output during installation.
# - $Password must remain [string] because the NSIS installer expects plain-text input.
@{
ExcludeRules = @(
'PSAvoidUsingWriteHost',
'PSAvoidUsingPlainTextForPassword'
)
}

29 changes: 29 additions & 0 deletions installer/windows/Run-Lint.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
$ErrorActionPreference = 'Stop'

# Ensure NuGet provider is available (required for Install-Module on fresh machines / CI runners)
if (-not (Get-PackageProvider -Name NuGet -ListAvailable -ErrorAction SilentlyContinue)) {
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Scope CurrentUser | Out-Null
}

# Install PSScriptAnalyzer if not already present, then load it
$analyzer = Get-Module -ListAvailable -Name PSScriptAnalyzer | Select-Object -First 1

if (-not $analyzer) {
Write-Host "Installing PSScriptAnalyzer ..." -ForegroundColor Yellow
Install-Module -Name PSScriptAnalyzer -Force -SkipPublisherCheck -Scope CurrentUser
}

Import-Module PSScriptAnalyzer -Force

# Lint all installer scripts
$settings = Join-Path $PSScriptRoot 'PSScriptAnalyzerSettings.psd1'
$results = Invoke-ScriptAnalyzer -Path "$PSScriptRoot\*.ps1" -Recurse -Settings $settings

if ($results) {
$results | Format-Table -AutoSize
Write-Host "$($results.Count) issue(s) found." -ForegroundColor Red
exit 1
} else {
Write-Host "No issues found." -ForegroundColor Green
}

18 changes: 9 additions & 9 deletions installer/windows/agent-installer-service-user.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ if ($installDir -like ".\*" -or $installDir -like ".\*") {
# Combine the profile path with the install directory
$fullInstallPath = Join-Path $profilePath $installDir

echo "Resolved installation path: $fullInstallPath"
Write-Output "Resolved installation path: $fullInstallPath"

# Can't install the OpenAEV agent in System32 location because NSIS 64 exe
$location = Get-Location
if ($location -like "*C:\Windows\System32*") { cd C:\ }
if ($location -like "*C:\Windows\System32*") { Set-Location C:\ }
switch ($env:PROCESSOR_ARCHITECTURE)
{
"AMD64" {$architecture = "x86_64"; Break}
Expand All @@ -73,18 +73,18 @@ switch ($env:PROCESSOR_ARCHITECTURE)
}
}
if ([string]::IsNullOrEmpty($architecture)) { throw "Architecture $env:PROCESSOR_ARCHITECTURE is not supported yet, please create a ticket in openaev github project" }
echo "Downloading and installing OpenAEV Agent..."
Write-Output "Downloading and installing OpenAEV Agent..."
try {
Invoke-WebRequest -Uri "${OPENAEV_URL}/api/agent/package/openaev/windows/${architecture}/service-user" -OutFile "agent-installer-service-user.exe";
# Use the resolved full installation path
./agent-installer-service-user.exe /S ~OPENAEV_URL="${OPENAEV_URL}" ~ACCESS_TOKEN="${OPENAEV_TOKEN}" ~UNSECURED_CERTIFICATE=${OPENAEV_UNSECURED_CERTIFICATE} ~WITH_PROXY=${OPENAEV_WITH_PROXY} ~SERVICE_NAME="${OPENAEV_SERVICE_NAME}" ~INSTALL_DIR="$fullInstallPath" ~USER="$User" ~PASSWORD="$Password" | Out-Null;
echo "OpenAEV agent has been successfully installed"
Write-Output "OpenAEV agent has been successfully installed"
} catch {
echo "Installation failed"
echo "Note: PowerShell 7 or higher is recommended. If the issue persists, consider upgrading."
echo $_
Write-Output "Installation failed"
Write-Output "Note: PowerShell 7 or higher is recommended. If the issue persists, consider upgrading."
Write-Output $_
} finally {
Start-Sleep -Seconds 2
rm -force ./agent-installer-service-user.exe;
if ($location -like "*C:\Windows\System32*") { cd C:\Windows\System32 }
Remove-Item -Force ./agent-installer-service-user.exe;
if ($location -like "*C:\Windows\System32*") { Set-Location C:\Windows\System32 }
}
22 changes: 11 additions & 11 deletions installer/windows/agent-installer-session-user.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Net.ServicePointManager]::SecurityProtocol += [Net.SecurityProtocolType]::Tls12;
# Can't install the OpenAEV agent in System32 location because NSIS 64 exe
$location = Get-Location
if ($location -like "*C:\Windows\System32*") { cd C:\ }
if ($location -like "*C:\Windows\System32*") { Set-Location C:\ }
switch ($env:PROCESSOR_ARCHITECTURE)
{
"AMD64" {$architecture = "x86_64"; Break}
Expand All @@ -15,7 +15,7 @@ switch ($env:PROCESSOR_ARCHITECTURE)
}
}
if ([string]::IsNullOrEmpty($architecture)) { throw "Architecture $env:PROCESSOR_ARCHITECTURE is not supported yet, please create a ticket in openaev github project" }
function Sanitize-UserName {
function ConvertTo-SafeUserName {
param(
[Parameter(Mandatory = $true)]
[string]$UserName
Expand All @@ -26,7 +26,7 @@ function Sanitize-UserName {
}
$BasePath = "${OPENAEV_INSTALL_DIR}";
$User = whoami;
$SanitizedUser = Sanitize-UserName -UserName $user;
$SanitizedUser = ConvertTo-SafeUserName -UserName $user;
$isElevated = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if ($isElevated) {
$AgentName = "OAEVAgent-Session-Administrator-$SanitizedUser"
Expand All @@ -37,19 +37,19 @@ $InstallDir = $BasePath + "\" + $AgentName;
$AgentPath = $InstallDir + "\openaev-agent.exe";

try {
echo "Stop existing agent";
Write-Output "Stop existing agent";
Get-Process | Where-Object { $_.Path -eq "$AgentPath" } | Stop-Process -Force;

echo "Downloading and installing OpenAEV Agent...";
Write-Output "Downloading and installing OpenAEV Agent...";
Invoke-WebRequest -Uri "${OPENAEV_URL}/api/agent/package/openaev/windows/${architecture}/session-user" -OutFile "agent-installer-session-user.exe";
./agent-installer-session-user.exe /S ~OPENAEV_URL="${OPENAEV_URL}" ~ACCESS_TOKEN="${OPENAEV_TOKEN}" ~UNSECURED_CERTIFICATE=${OPENAEV_UNSECURED_CERTIFICATE} ~WITH_PROXY=${OPENAEV_WITH_PROXY} ~SERVICE_NAME="${OPENAEV_SERVICE_NAME}" ~INSTALL_DIR="$BasePath";
echo "OpenAEV agent has been successfully installed"
Write-Output "OpenAEV agent has been successfully installed"
} catch {
echo "Installation failed"
echo "Note: PowerShell 7 or higher is recommended. If the issue persists, consider upgrading."
echo $_
Write-Output "Installation failed"
Write-Output "Note: PowerShell 7 or higher is recommended. If the issue persists, consider upgrading."
Write-Output $_
} finally {
Start-Sleep -Seconds 2
rm -force ./agent-installer-session-user.exe;
if ($location -like "*C:\Windows\System32*") { cd C:\Windows\System32 }
Remove-Item -Force ./agent-installer-session-user.exe;
if ($location -like "*C:\Windows\System32*") { Set-Location C:\Windows\System32 }
}
16 changes: 8 additions & 8 deletions installer/windows/agent-installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $isElevatedPowershell = ([Security.Principal.WindowsPrincipal] [Security.Princip
if ($isElevatedPowershell -like "False") { throw "PowerShell 'Run as Administrator' is required for installation" }
# Can't install the OpenAEV agent in System32 location because NSIS 64 exe
$location = Get-Location
if ($location -like "*C:\Windows\System32*") { cd C:\ }
if ($location -like "*C:\Windows\System32*") { Set-Location C:\ }
switch ($env:PROCESSOR_ARCHITECTURE)
{
"AMD64" {$architecture = "x86_64"; Break}
Expand All @@ -18,17 +18,17 @@ switch ($env:PROCESSOR_ARCHITECTURE)
}
if ([string]::IsNullOrEmpty($architecture)) { throw "Architecture $env:PROCESSOR_ARCHITECTURE is not supported yet, please create a ticket in openaev github project" }

echo "Downloading and installing OpenAEV Agent..."
Write-Output "Downloading and installing OpenAEV Agent..."
try {
Invoke-WebRequest -Uri "${OPENAEV_URL}/api/agent/package/openaev/windows/${architecture}/service" -OutFile "openaev-installer.exe";
./openaev-installer.exe /S ~OPENAEV_URL="${OPENAEV_URL}" ~ACCESS_TOKEN="${OPENAEV_TOKEN}" ~UNSECURED_CERTIFICATE=${OPENAEV_UNSECURED_CERTIFICATE} ~WITH_PROXY=${OPENAEV_WITH_PROXY} ~SERVICE_NAME="${OPENAEV_SERVICE_NAME}" ~INSTALL_DIR="${OPENAEV_INSTALL_DIR}" | Out-Null;
echo "OpenAEV agent has been successfully installed"
Write-Output "OpenAEV agent has been successfully installed"
} catch {
echo "Installation failed"
echo "Note: PowerShell 7 or higher is recommended. If the issue persists, consider upgrading."
echo $_
Write-Output "Installation failed"
Write-Output "Note: PowerShell 7 or higher is recommended. If the issue persists, consider upgrading."
Write-Output $_
} finally {
Start-Sleep -Seconds 2
rm -force ./openaev-installer.exe;
if ($location -like "*C:\Windows\System32*") { cd C:\Windows\System32 }
Remove-Item -Force ./openaev-installer.exe;
if ($location -like "*C:\Windows\System32*") { Set-Location C:\Windows\System32 }
}
8 changes: 4 additions & 4 deletions installer/windows/agent-upgrade-service-user.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ switch ($env:PROCESSOR_ARCHITECTURE)
}
}

function Sanitize-UserName {
function ConvertTo-SafeUserName {
param(
[Parameter(Mandatory = $true)]
[string]$UserName
Expand All @@ -26,7 +26,7 @@ if ([string]::IsNullOrEmpty($architecture)) { throw "Architecture $env:PROCESSOR

$BasePath = "${OPENAEV_INSTALL_DIR}";
$User = whoami;
$SanitizedUser = Sanitize-UserName -UserName $user;
$SanitizedUser = ConvertTo-SafeUserName -UserName $user;
$ServiceName = "${OPENAEV_SERVICE_NAME}";
$AgentName = "$ServiceName-$SanitizedUser";

Expand All @@ -46,7 +46,7 @@ Invoke-WebRequest -Uri "${OPENAEV_URL}/api/agent/executable/openaev/windows/${ar

sc.exe stop $AgentName;

rm -force $AgentPath;
mv $AgentUpgradedPath $AgentPath;
Remove-Item -Force $AgentPath;
Move-Item $AgentUpgradedPath $AgentPath;

sc.exe start $AgentName;
20 changes: 10 additions & 10 deletions installer/windows/agent-upgrade-session-user.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ switch ($env:PROCESSOR_ARCHITECTURE)
}
}
if ([string]::IsNullOrEmpty($architecture)) { throw "Architecture $env:PROCESSOR_ARCHITECTURE is not supported yet, please create a ticket in openaev github project" }
function Sanitize-UserName {
function ConvertTo-SafeUserName {
param(
[Parameter(Mandatory = $true)]
[string]$UserName
Expand All @@ -23,7 +23,7 @@ function Sanitize-UserName {
}
$BasePath = "${OPENAEV_INSTALL_DIR}";
$User = whoami;
$SanitizedUser = Sanitize-UserName -UserName $user;
$SanitizedUser = ConvertTo-SafeUserName -UserName $user;
$isElevated = ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
if ($isElevated) {
$AgentName = "${OPENAEV_SERVICE_NAME}-Administrator-$SanitizedUser"
Expand Down Expand Up @@ -67,18 +67,18 @@ $AgentPath = $AgentPath -replace "OAEV", "OBAS"
Get-Process | Where-Object { $_.Path -eq "$AgentPath" } | Stop-Process -Force;
$UninstallDir = "${OPENAEV_INSTALL_DIR}" -replace "openaev", "openbas"
$UninstallDir = "${OPENAEV_INSTALL_DIR}" -replace "OAEV", "OBAS"
rm -force "${UninstallDir}/openbas.ico"
rm -force "${UninstallDir}/openbas_agent_kill.ps1"
rm -force "${UninstallDir}/openbas_agent_start.ps1"
rm -force "${UninstallDir}/openbas-agent.exe"
rm -force "${UninstallDir}/openbas-agent-config.toml"
rm -force "${UninstallDir}/uninstall.exe"
Remove-Item -Force "${UninstallDir}/openbas.ico"
Remove-Item -Force "${UninstallDir}/openbas_agent_kill.ps1"
Remove-Item -Force "${UninstallDir}/openbas_agent_start.ps1"
Remove-Item -Force "${UninstallDir}/openbas-agent.exe"
Remove-Item -Force "${UninstallDir}/openbas-agent-config.toml"
Remove-Item -Force "${UninstallDir}/uninstall.exe"
if ($isElevated) {
schtasks.exe /End /TN "$AgentName"
schtasks.exe /Delete /TN "$AgentName" /F
} else {
Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Run" -Name "$AgentName"
}
rm -force ./openaev-installer.ps1
Remove-Item -Force ./openaev-installer.ps1
}
rm -force ./openaev-installer-session-user.exe;
Remove-Item -Force ./openaev-installer-session-user.exe;
14 changes: 7 additions & 7 deletions installer/windows/agent-upgrade.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ Invoke-WebRequest -Uri "${OPENAEV_URL}/api/agent/installer/openaev/windows/servi
sc.exe stop "${OPENAEV_SERVICE_NAME}"
$UninstallDir = "${OPENAEV_INSTALL_DIR}" -replace "openaev", "openbas"
$UninstallDir = "${OPENAEV_INSTALL_DIR}" -replace "OAEV", "OBAS"
rm -force "${UninstallDir}/openbas.ico"
rm -force "${UninstallDir}/openbas_agent_kill.ps1"
rm -force "${UninstallDir}/openbas-agent.exe"
rm -force "${UninstallDir}/openbas-agent-config.toml"
rm -force "${UninstallDir}/uninstall.exe"
Remove-Item -Force "${UninstallDir}/openbas.ico"
Remove-Item -Force "${UninstallDir}/openbas_agent_kill.ps1"
Remove-Item -Force "${UninstallDir}/openbas-agent.exe"
Remove-Item -Force "${UninstallDir}/openbas-agent-config.toml"
Remove-Item -Force "${UninstallDir}/uninstall.exe"
sc.exe delete "${OPENAEV_SERVICE_NAME}"
rm -force ./openaev-installer.ps1
Remove-Item -Force ./openaev-installer.ps1
}
rm -force ./openaev-installer.exe;
Remove-Item -Force ./openaev-installer.exe;