Have you tried starting the batch file as a new process?
Main Topics
Browse All TopicsHi to all,
I am trying to run a .Bat file from a windows service. This .bat file needs to run on a timer, but it does not seem to work.
Is it possible to run a .bat file using a service or not? I used the code below to create a log file of what is going on, but that also seems not to work.
Any help on this would be welcomed.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Judging by the System.EventArgs parameter of you Tick handler, I perceive that you dragged the Timer component from the toolbox onto the designer surface. Instead of using that timer, use the timer found in System.Timers.Timer. I have modified your code slightly to use this timer and to remove some *unneeded* code.
Business Accounts
Answer for Membership
by: csharppPosted on 2009-06-05 at 12:05:13ID: 24559295
You can use Process.Start to start .bat files.