1

I am following this thread to uninstall mozilla firefox from my Windows 10 systems.

I have installed mozilla firefox originally with an exe installer and I don't get a mozilla entry executing gwmi -Class Win32_Product.

Is there any way I can trigger the uninstaller for that software on my windows system?

Note: I wont be able to use msi installer for this purpose.

2 Answers 2

6

If you run

Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ | ? { $_ -match "Firefox" }

It shows the UninstallString as:

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

You should be able to run this to remove Firefox. Use the /s switch to run a silent uninstall.

Something along the lines of:

'"C:\Program Files (x86)\Mozilla Firefox\uninstall\helper.exe /s"' | cmd

Sign up to request clarification or add additional context in comments.

2 Comments

Pro tip: If you use forward slashes, it works perfectly well on Windows, and also highlight better on stackOverflow.
The first step in this answer produces a hash table and we're asked to find a value from it and manually use that in a second step. This answer could be improved if the first step of the answer was piped through to select the path of the uninstall executable and then that was piped through to perform the uninstall, all in one command or script.
2

Adding modified working code with architecture diff

$x86App  = Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*' | ? { $_ -match "Firefox" }

$x64App = Get-ChildItem 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' | ? { $_ -match "Firefox" }

if ($x86App)
{
$UninstallPath = ($x86App |Get-ItemProperty).UninstallString
Start-Process -NoNewWindow -FilePath $UninstallPath -ArgumentList " /s"
}

elseif($x64App)
{
$UninstallPath = ($x64App |Get-ItemProperty).UninstallString
Start-Process -NoNewWindow -FilePath $UninstallPath -ArgumentList " /s"

}

2 Comments

I think you might have these backwards.
I cannot find Python 3.6 here. It's not working if I use it for Python by replacing "Python" with "Firefox". Am I missing something?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.