C++ Program Executables not Running from Scheduled Tasks

I have written a number of programs in C++ which take data from large text files and condense it into smaller files that can be uploaded to our website and used by local apps. These had been scheduled to run daily on a Windows 2003 server, and worked just fine as such. However, since we migrated to a Win 2008 Server, these programs refuse to run in task scheduler. They work if I execute them through win explorer or command line, but they either hang or return a 0x3 error from scheduled tasks. At first, I thought it had to do with the fact that the programs copy files from remote locations, but after I made everything local (the programs now only read & create files in their own directory), it still doesn't work.

I am running the tasks as an administrator, with highest privileges.

No idea what to do now.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sounds more like a DEP issue or something to do with rights.

Try This:
To troubleshoot the first task you described, you may check the following settings.

1.     Check if the task application runs under a path where log on user has the proper permission.  If not, you may add a command line like "CD c:\users\%username%\desktop" in front of the command line to start application.

2.     Make sure the account to run task scheduler is in group "log on as batch job" rights (server side). Control Panel|Admin Tools|Local Security Policy\Local Policies\User Rights Assignments"Log on as a batch job"

resource: http://social.technet.microsoft.com/Forums/en-US/winservergen/thread/933aac93-d972-4aea-adeb-1fc1fba6a4c4/


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rvfowler2Author Commented:
Thanks! Turns out, the admin account didn't have permissions for the system32 dir. I didn't realize scheduled tasks started in this directory.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.