Batch file issue in XP

To be filled by o.e.m. / To be filled by o.e.m.
February 6, 2011 at 19:26:57
Specs: Microsoft Windows XP Home Edition, 2.362 GHz / 2047 MB
I am running the following batch file in XP. The START /W commands are there to
ensure that each program completes properly and in sequence.

@echo off
START /W c:\mydown~1\instal~1\firefo~1\SpeedyFox\speedy~1.exe /default_profile
START /W c:\progra~1\clearers\genera~1.bat
START /W c:\progra~1\ccleaner\ccleaner.exe /AUTO
START C:\Windows\system32\shutdown.exe -s -t 00
It's fine. It runs speedyfox, then another batch file then CCleaner and finally shuts
down the computer. I can tell it runs CCleaner because its icon flashes up in the notification area of the taskbar. For testing I've remmed out the last line with ::

Now here's the thing that has me foxed. If I replace the CCleaner line with the following
it no longer runs CCleaner and there are no error messages:

START /W "c:\program files\ccleaner\ccleaner.exe" /AUTO

It seems it doesn't like long file names because the same thing happens with speedyfox
if I use the same long file format in that line.

Any ideas please?

We all live on the same ball.

See More: Batch file issue in XP

Report •

February 6, 2011 at 20:00:29
Start assumes that the first double quoted argument is a window title(which only works for console windows AFAIK). The trick is to pass start an empty argument.

START /W "" "c:\program files\ccleaner\ccleaner.exe" /AUTO

It's not documented by "start /?", but it should be....

Report •

February 6, 2011 at 20:03:48
Another thing I forgot, you don't have to start shutdown, provided %path% is as it should be, all you need is:

shutdown -s -t 0

Report •

February 6, 2011 at 23:52:14
As Judago says, you can run it;

CCleaner.exe /auto

I use that often :)

Happy is ONE who says I am an OttoMAN.

Report •

Related Solutions

February 7, 2011 at 07:54:32
Thanks Judago and MUs for your most helpful responses. My knowledge of batch files is "enought to get away with (mostly)" so it was good to get the refinements. I shall save this post for info.

Thanks again.

We all live on the same ball.

Report •

Ask Question