Uninstallation of Mozilla Firefox

Hello,

I am having issues in deploying Firefox with PSAD Tool. We have different versions installed in our environment. Our goal is to remove any old versions installed and install the latest version. In preinstall step I am using below command:

Execute-Process -FilePath "$envProgramFiles(x86)\Mozilla Firefox\uninstall\helper.exe" -Parameters "/S" -WindowStyle Hidden -IgnoreExitCodes '3010'

But I am always getting error 60002 ins log generated which maps to Execute-Process error as per doc. The log says C:\ProgramFiles(x86)\Mozilla Firefox\uninstall\helper.exe is a valid qualified path
but then it throws this error:

[Pre-Installation] :: Function failed, setting exit code to [60002]. 
Error Record:
-------------

Message        : File [C:\Program Files(x86)\Mozilla Firefox\uninstall\helper.exe] not found.
InnerException : 

FullyQualifiedErrorId : File [C:\Program Files(x86)\Mozilla Firefox\uninstall\helper.exe] not found.

PositionMessage : 
                  At C:\Windows\ccmcache\c\AppDeployToolkit\AppDeployToolkitMain.ps1:2674 char:11
                  +                     Throw <<<<  "File [$Path] not found."

Can anyone assist me where I am going wrong!!! Any help would be really appreciated

This is what I did for Firefox with 3.6.0.
https://drive.google.com/file/d/0B6hsie57PTwKSVQ0ZVVrUTZWOGM/view?usp=sharing

Just in case someone else looks for this I had a similar issue which was resolved by encasing $envProgramFiles(x86) in {}

Which for the original example in question would be…

Execute-Process -FilePath “{$envProgramFiles(x86)}\Mozilla Firefox\uninstall\helper.exe” -Parameters “/S” -WindowStyle Hidden -IgnoreExitCodes ‘3010’

That is not really correct. You have to decide whether you want to use Toolkit variables or System variables.

$envProgramFilesX86 is a correct toolkit variable

${env:ProgramFiles(x86)} is a correct system variable

The toolkit variable points to the system variable so both point to the same location but the first one obviously only works for the toolkit.

You are right I realised and forgot to go back and edit

${envProgramFiles(x86)} is what I meant.

$envProgramFilesX86 will work in toolkit however it was resolving as C:\Program Files(x86)
Without a space before the brackets like the normal Windows syntax for the Program Files (x86) folder.