Uninstall Mozilla Firefox from Environment

Hey guys... Need a suggestion on this... We've decided to uninstall Firefox (any version) from the computers.. and I identified that there are many versions of firefox when I pulled up the report. unfortunately, when I tried to uninstall from few PC's... the helper.exe is missing, and I've downloaded the latest version of firefox, created a new package for helper.exe, added the new firefox version as its dependency, and uninstalling the firefox.

I know its a tedious task .. but just wanted to check if there is a better way to uninstall firefox , hassle free..

any suggestion is w

August 28th, 2015 4:02am

one way you can accomplish - create a UNINSTALL script that will loop though the uninstall hive (x86 and x64) of the HKLM registry looking for the displayname (firefox).If the displayname contains firefox then the script will search for the UninstallString value. If the uninstall value contains MSIEXEC, it will fetch the value to get the product code. The script will then call msiexec /X%ProductCode% /qn REBOOT=REALLYSUPPRESS to perform the uninstall.

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 4:19am

You can use PS to make the script short and crisp.Or you can use VBS which ever you are comfortable.
August 28th, 2015 4:28am

I'm a novice when it comes to scripting!! however, I know how to package a script and run on the machine.

can you please help me with the script.. I really appreciate it! :)

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 4:43am

Enter the following as your uninstall command 

"C:\Program Files\Mozilla Firefox\uninstall\helper.exe" /S

or 

"C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe" /S 

depending if running x86 or x64 de

August 28th, 2015 5:00am

you won't find the helper.exe if user installed firefox as user rights. You know, you can install firefox as admin or as user.

For uninstall user rights installed firefox you can use this powershell script. Remember Installation behavior: Install for System.

#Uninstall Firefox User rights installed
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()
}

#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
}

Dectetion can use:

$firefox = Get-Item "c:\Users\*\Appdata\Local\Mozilla Firefox\firefox.exe"
if ($firefox -eq $null) {
write-host not installed}

For uninstall Admin rights installed firefox, you can use helper.exe, as you already tested that yourself.

Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 6:15pm

you won't find the helper.exe if user installed firefox as user rights. You know, you can install firefox as admin or as user.

For uninstall user rights installed firefox you can use this powershell script. Remember Installation behavior: Install for System.

#Uninstall Firefox User rights installed
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()
}

#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
}

Dectetion can use:

$firefox = Get-Item "c:\Users\*\Appdata\Local\Mozilla Firefox\firefox.exe"
if ($firefox -eq $null) {
write-host not installed}

For uninstall Admin rights installed firefox, you can use helper.exe, as you already tested that yourself.

August 29th, 2015 10:15pm

you won't find the helper.exe if user installed firefox as user rights. You know, you can install firefox as admin or as user.

For uninstall user rights installed firefox you can use this powershell script. Remember Installation behavior: Install for System.

#Uninstall Firefox User rights installed
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()
}

#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
}

Dectetion can use:

$firefox = Get-Item "c:\Users\*\Appdata\Local\Mozilla Firefox\firefox.exe"
if ($firefox -eq $null) {
write-host not installed}

For uninstall Admin rights installed firefox, you can use helper.exe, as you already tested that yourself.

  • Marked as answer by Basementmouse Monday, August 31, 2015 6:31 AM
Free Windows Admin Tool Kit Click here and download it now
August 29th, 2015 10:15pm

a little of ur script and my batch command worked in finishing! thanks a ton Sandy :)
August 31st, 2015 2:34am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics