Execute-Process file not found

Topics: Archive - Deployment Scripts
Jan 5 at 1:09 PM
Have a script im trying to use which will uninstall all previous versions of an application, so i threw a load of statements like below in.
execute-process 'c:\ver1\uninstall.exe' -continueonerror=$true
execute-process 'c:\ver2\uninstall.exe' -continueonerror=$true
Unfortunately, if it cant find one of these versions, it bombs out saying file not found and wont continue, i thought the continue on error would resolve this, but it still fails.

Anyone got a better way of doing this, or a way of getting it to continue regardless.