When I run CodedUI Test from a small Console tool via vstest.console.exe from a scheduled task I sometimes see this error message on different PCs:
vstest.console.exe
1) go to exe file click the properties
2) click the unblock button
then this will slove