I’m trying to uninstall Firefox with their recommended method of running helper.exe. The problem is that the UninstallString has double quotes around it because the file path has spaces in it. Consequently, when I try to grab the path to the uninstaller from the Registry, the quotation marks are stored in the variable.
I know that I can replace the quotes with nothing or I can trim the string as well. I believe if I weren’t using the toolkit I would just use the call operator (&). Please let me know if you have any suggestions.
[string]$appUninstaller = (Get-InstalledApplication -Name ‘Mozilla Firefox’).UninstallString
Execute-Process -Path “$appUninstaller” -Parameters ‘/S’