Windows batch files
#1
Windows batch files
Anyone any good at writing these? I'm struggling getting one to work. I need the batch file to pause for a little while before carrying on. I'm trying to use this:
The problem I have is that the system I'm using it on is a touch screen PC with XP embedded running on it and it doesn't seem to have ping in the system32 folder. I've tried getting ping from another machine and putting it in there, but no luck. This did work for Tasklist which was also missing and so the following did not work, but now does:
I'm not sure what error messages get displayed as I don't have a USB keyboard handy so keep modifying the batch file and sticking it on a USB before walking 200m and putting it on the system I need to use it on.
It all works fine on my office PC, but not on the touchscreen. Need to delay starting a program until the OPC server has finished loading as otherwise it doesn't work right. The tasklist part restarts a logger if it is shut down as the operators are stupid and keep closing it instead of minimizing it.
Any suggestions?
Code:
ping 127.0.0.1 -n 10 -w 1000 >nul
Code:
TASKLIST /FI "imagename eq %ExeFile%" > %TaskStatus%
It all works fine on my office PC, but not on the touchscreen. Need to delay starting a program until the OPC server has finished loading as otherwise it doesn't work right. The tasklist part restarts a logger if it is shut down as the operators are stupid and keep closing it instead of minimizing it.
Any suggestions?
Last edited by Saint AAI; 13 July 2011 at 01:08 PM.
#2
Personally I would download sleep.exe from the Windows 2003 resource kit and use that instead.
So
SLEEP 10
would make the batch file wait for 10 seconds before executing the next command.
So
SLEEP 10
would make the batch file wait for 10 seconds before executing the next command.
Thread
Thread Starter
Forum
Replies
Last Post