Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Remove Edge.ps1 #922

Merged
merged 5 commits into from
Oct 19, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function RemoveEdgeChromium {
$uninstallKeyPath = Join-Path -Path $baseKey -ChildPath "Windows\CurrentVersion\Uninstall\Microsoft Edge"
if (Test-Path $uninstallKeyPath) {
$uninstallString = (Get-ItemProperty -Path $uninstallKeyPath).UninstallString + " --force-uninstall"
Start-Process cmd.exe "/c $uninstallString" -WindowStyle Hidden | Out-Null 2> $null
Start-Process cmd.exe "/c $uninstallString" -WindowStyle Hidden 2>&1 | Out-Null
}

# remove user data
Expand Down Expand Up @@ -151,7 +151,7 @@ function RemoveWebView {
if (Test-Path $webviewHKLM) {$webviewUninstallKey += $webviewHKLM}
foreach ($key in $webviewUninstallKey) {
$webviewUninstallString = (Get-ItemProperty -Path $key).UninstallString + " --force-uninstall"
Start-Process cmd.exe "/c $webviewUninstallString" -WindowStyle Hidden | Out-Null 2> $null
Start-Process cmd.exe "/c $webviewUninstallString" -WindowStyle Hidden 2>&1 | Out-Null
}
}

Expand Down Expand Up @@ -235,4 +235,4 @@ while (!($continue)) {

Clear-Host
UninstallAll
Completed
Completed
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function Uninstall-MsiexecAppByName {
if ($uninstallString -like "*MsiExec.exe*") {
$foundKey = $key | Split-Path -Leaf
Write-Warning "Uninstalling $displayName..."
Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /X$foundKey REBOOT=ReallySuppress /norestart" | Out-Null 2> $null
Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /X$foundKey REBOOT=ReallySuppress /norestart" 2>&1 | Out-Null
}
}
}
Expand All @@ -46,4 +46,4 @@ function Uninstall-MsiexecAppByName {
}
}

Export-ModuleMember -Function Uninstall-MsiexecAppByName
Export-ModuleMember -Function Uninstall-MsiexecAppByName
2 changes: 1 addition & 1 deletion src/playbook/Executables/CLEANUP.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function Invoke-AtlasDiskCleanup {
Set-ItemProperty -Path $path -Name 'StateFlags0064' -Value $value -Type DWORD
}
# Run preset 64 (0-65535)
Start-Process -FilePath "cleanmgr.exe" -ArgumentList "/sagerun:64" | Out-Null 2> $null
Start-Process -FilePath "cleanmgr.exe" -ArgumentList "/sagerun:64" 2>&1 | Out-Null
}

# Check for other installations of Windows
Expand Down
4 changes: 2 additions & 2 deletions src/playbook/Executables/LIBREWOLF.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if ($NoUpdater) {
}

Write-Warning "Installing LibreWolf silently"
Start-Process -Wait -FilePath $outputLibrewolf -ArgumentList "/S" | Out-Null 2> $null
Start-Process -Wait -FilePath $outputLibrewolf -ArgumentList "/S" 2>&1 | Out-Null
if (!(Test-Path $librewolfPath)) {
Write-Host "Installing LibreWolf silently failed."
exit 1
Expand Down Expand Up @@ -77,4 +77,4 @@ if ($NoUpdater) { Create-Shortcut -Source "$updaterPath\Librewolf-WinUpdater.exe

Write-Warning "Removing temporary installer files"
Remove-Item "$outputLibrewolf" -Force
if ($NoUpdater) { Remove-Item "$outputLibrewolfUpdater" -Force }
if ($NoUpdater) { Remove-Item "$outputLibrewolfUpdater" -Force }
14 changes: 7 additions & 7 deletions src/playbook/Executables/SOFTWARE.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Set-Location $tempDir
if ($Chrome) {
Write-Host "Installing Google Chrome..."
& curl.exe -LSs "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi" -o "$tempDir\chrome.msi"
Start-Process -FilePath "$tempDir\chrome.msi" -WindowStyle Hidden -ArgumentList '/qn' -Wait | Out-Null 2> $null
Start-Process -FilePath "$tempDir\chrome.msi" -WindowStyle Hidden -ArgumentList '/qn' -Wait 2>&1 | Out-Null
exit
}

Expand All @@ -29,7 +29,7 @@ if ($Brave) {
exit 1
}

& "$tempDir\BraveSetup.exe" /silent /install | Out-Null 2> $null
& "$tempDir\BraveSetup.exe" /silent /install 2>&1 | Out-Null

do {
$processesFound = Get-Process | Where-Object { "BraveSetup" -contains $_.Name } | Select-Object -ExpandProperty Name
Expand Down Expand Up @@ -74,21 +74,21 @@ $num = 0; foreach ($a in $vcredists.GetEnumerator()) {
# curl is faster than Invoke-WebRequest
Write-Host "Installing Visual C++ Runtime $num..."
& curl.exe -LSs "$($a.Name)" -o "$vcredist"
Start-Process -FilePath $vcredist -WindowStyle Hidden -ArgumentList $a.Value -Wait | Out-Null 2> $null
Start-Process -FilePath $vcredist -WindowStyle Hidden -ArgumentList $a.Value -Wait 2>&1 | Out-Null
}

# 7-Zip
$website = 'https://7-zip.org/'
$download = $website + ((Invoke-WebRequest $website -UseBasicParsing).Links.href | Where-Object { $_ -like "a/7z2301-x64.exe" })
& curl.exe -LSs $download -o "$tempDir\7zip.exe"
Start-Process -FilePath "$tempDir\7zip.exe" -WindowStyle Hidden -ArgumentList '/S' -Wait | Out-Null 2> $null
Start-Process -FilePath "$tempDir\7zip.exe" -WindowStyle Hidden -ArgumentList '/S' -Wait 2>&1 | Out-Null

# Legacy DirectX runtimes
& curl.exe -LSs "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe" -o "$tempDir\directx.exe"
Write-Host "Extracting legacy DirectX runtimes..."
Start-Process -FilePath "$tempDir\directx.exe" -WindowStyle Hidden -ArgumentList "/q /c /t:`"$tempDir\directx`"" -Wait | Out-Null 2> $null
Start-Process -FilePath "$tempDir\directx.exe" -WindowStyle Hidden -ArgumentList "/q /c /t:`"$tempDir\directx`"" -Wait 2>&1 | Out-Null
Write-Host "Installing legacy DirectX runtimes..."
Start-Process -FilePath "$tempDir\directx\dxsetup.exe" -WindowStyle Hidden -ArgumentList '/silent' -Wait | Out-Null 2> $null
Start-Process -FilePath "$tempDir\directx\dxsetup.exe" -WindowStyle Hidden -ArgumentList '/silent' -Wait 2>&1 | Out-Null

# Remove temporary directory
Remove-Item -Path $tempDir -Force -Recurse *>$null
Remove-Item -Path $tempDir -Force -Recurse *>$null