Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Windows batch files

Thread Tools
 
Search this Thread
 
Old Jul 13, 2011 | 01:04 PM
  #1  
Saint AAI's Avatar
Saint AAI
Thread Starter
Scooby Regular
 
Joined: Mar 2005
Posts: 964
Likes: 0
Default 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:

Code:
ping 127.0.0.1 -n 10 -w 1000 >nul
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:

Code:
TASKLIST /FI "imagename eq %ExeFile%" > %TaskStatus%
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?

Last edited by Saint AAI; Jul 13, 2011 at 01:08 PM.
Reply
Old Jul 13, 2011 | 04:54 PM
  #2  
LostUser's Avatar
LostUser
Scooby Regular
 
Joined: Oct 2005
Posts: 476
Likes: 0
Default

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.
Reply
Old Jul 13, 2011 | 05:16 PM
  #3  
Saint AAI's Avatar
Saint AAI
Thread Starter
Scooby Regular
 
Joined: Mar 2005
Posts: 964
Likes: 0
Default

I'll give it a try thanks.

Edit: Works great thanks.

Last edited by Saint AAI; Jul 14, 2011 at 07:14 AM.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
Nov 4, 2021 07:12 PM
FuZzBoM
Wheels, Tyres & Brakes
16
Oct 4, 2015 09:49 PM
Ganz1983
Subaru
5
Oct 2, 2015 09:22 AM
Nick_Cat
Computer & Technology Related
2
Sep 26, 2015 08:00 AM
Littleted
Computer & Technology Related
0
Sep 25, 2015 08:44 AM




All times are GMT +1. The time now is 04:40 AM.