diff --git a/1_Install.ps1 b/1_Install.ps1 index e506446..2440a56 100644 --- a/1_Install.ps1 +++ b/1_Install.ps1 @@ -178,6 +178,34 @@ foreach ($app in $officeAppsToRemove) { Write-Host "Office application removal process completed." -ForegroundColor Green +# Remove Edge Progressive Web Apps (PWAs) like LinkedIn +Write-Host "Checking and removing Edge Progressive Web Apps..." -ForegroundColor Yellow + +$edgePWAPath = "$env:LOCALAPPDATA\Microsoft\Edge\User Data\Default\Web Applications" +if (Test-Path $edgePWAPath) { + try { + $pwaFolders = Get-ChildItem -Path $edgePWAPath -Directory -ErrorAction SilentlyContinue + foreach ($folder in $pwaFolders) { + $manifestPath = Join-Path $folder.FullName "Manifest" + if (Test-Path $manifestPath) { + $manifestContent = Get-Content $manifestPath -Raw -ErrorAction SilentlyContinue + if ($manifestContent -match "linkedin" -or $manifestContent -match "LinkedIn") { + Write-Host "Found LinkedIn PWA, removing folder: $($folder.Name)" -ForegroundColor Red + Remove-Item -Path $folder.FullName -Recurse -Force -ErrorAction SilentlyContinue + Write-Host "Removed LinkedIn PWA" -ForegroundColor Green + } + } + } + } + catch { + Write-Warning "Failed to check Edge PWAs: $_" + } +} else { + Write-Host "Edge PWA directory not found" -ForegroundColor Gray +} + +Write-Host "Edge PWA removal process completed." -ForegroundColor Green + # Font Install Write-Host "Checking and installing fonts..." -ForegroundColor Yellow $fontSourceFolder = ".\Fonts" diff --git a/2_ConfigUpdate.ps1 b/2_ConfigUpdate.ps1 index 84740e3..d2519ae 100644 --- a/2_ConfigUpdate.ps1 +++ b/2_ConfigUpdate.ps1 @@ -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"