Add functionality to remove Edge Progressive Web Apps and update system PATH for Miniforge scripts

This commit is contained in:
2025-09-26 09:48:06 -05:00
parent f9368c727b
commit e85aa6b243
2 changed files with 38 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ Copy-Item -Path $sourceFile -Destination $destinationFile -Force
Write-Host "policies.json has been copied/replaced in the distribution folder."
$forgePath = "C:\ProgramData\miniforge3"
$forgeScriptsPath = "C:\ProgramData\miniforge3\Scripts"
$systemPathReference = [System.Environment]::GetEnvironmentVariable("Path", "Machine")
# Check if the path already contains $forgePath
@@ -57,6 +58,15 @@ if (-not ($systemPathReference -split ";" | Where-Object { $_ -eq $forgePath }))
[System.Environment]::SetEnvironmentVariable("Path", $newPath, "Machine")
}
# Check if the path already contains $forgeScriptsPath
if (-not ($systemPathReference -split ";" | Where-Object { $_ -eq $forgeScriptsPath })) {
# Get the updated path (in case it was modified above)
$currentPath = [System.Environment]::GetEnvironmentVariable("Path", "Machine")
# Append $forgeScriptsPath to the existing path, with proper separation by semicolon
$newPath = $currentPath + ";" + $forgeScriptsPath
[System.Environment]::SetEnvironmentVariable("Path", $newPath, "Machine")
}
# Define the base Firefox profiles directory
$profilesDir = "$env:APPDATA\Mozilla\Firefox\Profiles"