Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Remove Fire Fox Web Browser
- #Uninstall Firefox installed user Rights
- $FireFoxSTDEXE = "C:\Users\%username%\AppData\Local\Mozilla Firefox\uninstall\helper.exe"
- $FileExistsSTD = Test-Path $FireFoxSTDEXE
- If ($FileExistsSTD -eq $True) {
- get-childitem "C:\users" firefox.exe -Recurse -Force | foreach-object {
- $setup = $_.directory.tostring() + "\uninstall\helper.exe"
- $args = " /s"
- $uninst = Start-Process $setup -PassThru -ArgumentList $args -wait
- $uninst.WaitForExit()
- }
- } Else {Write-Host "FireFox Admin Install Not Found"}
- <#
- Delete registry key
- $null = New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS
- Set-Location HKU:
- Get-ChildItem -path HKU: | ForEach-Object {
- $uninstall = $_.Name + "\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"
- $firefox = get-ChildItem -path $uninstall | ?{$_.Name -match "Mozilla Firefox"}
- write-host $firefox
- Remove-Item -path $firefox -Recurse -ErrorAction SilentlyContinue
- }
- #>
- #Uninstall FireFox installed with Admin Rights
- $FireFoxADMEXE = "C:\Program Files\Mozilla Firefox\firefox.exe"
- $FileExistsADM = Test-Path $FireFoxADMEXE
- $RemoveFireFox="C:\Program Files\Mozilla Firefox\uninstall\helper.exe"
- If ($FileExistsADM -eq $True) {
- #Invoke-Command $RemoveFireFox + $args
- Start-Process -FilePath "$RemoveFireFox" -ArgumentList "/S"
- }
- Else {Write-Host "FireFox Admin Install Not Found"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement