I am working on creating a program that creates random math problems for my daughter. I'm implementing this idea in Windows 7 by using a C program to create a TeX document, and then using a system command to run the latex compiler. I am running into problems with the system command, however. Namely, every time I run my code I get a message that says latex: permission denied. I can run the latex compiler just fine directly from the command line, however it fails when trying to run it from my executable.
What do I need to do, to fix this situation?