Add functionality to remove Edge Progressive Web Apps and update system PATH for Miniforge scripts
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user