« Happy Thanksgiving (Early) | Main | The Ultimate in Female Body Piercing »

October 26, 2005

DOS Sleep Command for XP and Server 2003

ImageMatics sucks. All of their products suck...at least all the ones I've bought. StillMotion PE, StillMotion PE+, StillMotion WD, and StillMotion WD+ all suck. Some of them suck worse than others, because they cost more. But they all suck.

They all have too many limitations to list here, but the thing has has me stirred up right now is that you can't daisy-chain the slideshows together without going through a mind-numbingly, tedious exercise that you wouldn't believe if I told you. Furthermore, the retarded slideshows can't be made to close themselves at the end of the show. So I can't string them together in a bat file, because they won't return control to the bat file when they end.

I've decided that I can force everything to work if I open two DOS windows. One DOS window will run a .bat file with all of my slideshows in sequential order. The other DOS window will then wait the correct amount of time for the slideshow to play, and then kill the slideshow with the taskkill command.

The problemw with DOS is that, there's no "timer" or "wait" command that will pause for a certain amount of time. You can trick DOS to pause for a given amoutn of time by doing a couple of slick "ping" commands, but that's not really my style. I want it to work right. As it turns out, MicroSoft has a sleep command available, in the "Windows Server 2003 Resource Kit Tools". So, if you're using XP or Windows Server 2003, you're in luck. All you have to do is go here and download it. If that link is broken, go here and look for "Windows Server 2003 Resource Kit Tools" and download it.

It's easy to install. Only takes a couple of minutes. Close any DOS windows you have open and relaunch them. (Yes, you have to. Trust me.) Type the following:

C:\>sleep /?
Usage: SLEEP time-to-sleep-in-seconds
SLEEP [-m] time-to-sleep-in-milliseconds
SLEEP [-c] commited-memory ratio (1%-100%)

So, it's actually pretty slick. I just set up a bat file like this:

c:\sleep 60
c:\taskkill /f /im gs.exe

So, this allows me to run the taskkill command at the correct time, which then returns control to the other bat file, which then executes the next slideshow. :)

Update: I ended up using the start command to launch the slideshow executables, then running the sleep command, followed by taskkill all in the same bat file, as follows:

start burn.exe
sleep 227
taskkill /f /im burn.exe

This works a little better, as only one .bat file is required.

Technorati tags:
Delicious tags:

Folksonomy:These icons link to social bookmarking sites where readers can share web pages.
 
digg  Furl  Spurl  Reddit  blinkbits  BlinkList  blogmarks  connotea  De.lirio.us  Fark  feedmelinks  LinkaGoGo  Ma.gnolia  NewsVine  Netvouz  RawSugar  scuttle  Shadows  Simpy  Smarking  TailRank  Wists  YahooMyWeb

Posted by Peenie Wallie on October 26, 2005 at 10:03 PM