I have a release TFS build which has uninstall and install step of an application in my agent folder for further testing. Unfortunately, when it happens to be fresh install in the agent directory it fails with error "Uninstall' is not recognized as an internal or external command".
In this case, I want to run a script in the batch or command line task to check if uninstall.exe is present before running the Uninstall task. Is there any way where I can call Uninstall or Install step according to the If condition in my script?
for an example if exist "C:\Program Files\Altiris\Altiris Agent\AexAgentUtil.exe" goto task1 else task2
Thanks in advance