I am having problems running an executable from Task Scheduler from one particular machine. The executable was created using VC++ and contains the code:
system( "p4 sync -f" );
Now the problem is when I execute from Task Scheduler, that line of code is skipped. If I run the executable in any other way it runs fine. That is, it runs fine when I double-click it, run it from the command line, run a batch file which calls that executable, etc etc. Only running from Task Scheduler I get problems. I need this executable to run at timed intervals without human intervention.
The weird thing is, I have the executable running fine from Task Scheduler on two other machines (same OS, same everything except hardware). I compared the VS properties in the working machines to that of the faulty machine and everything is the same.
What's going on here?