Hi everyone, i'm trying to execute a .bat file through a c# console application using code from here:
[http://stackoverflow.com/questions/361097/c-sharp-service-cannot-execute-batch-file](stack overflow)
Kevin's solution kinda works, but some commands in my .bat file get ignored for some reason, but when i manually execute the .bat file all commands work just fine. e.g. xcopy command doesn't work while executing .bat from console app.
Any idea why this happens?
witchDoc
0
Newbie Poster
Recommended Answers
Jump to PostDid you check the environmental variables that your bat file is using (such as PATH)? It may not be able to find the commands you want it to execute.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.