I was just dealing with the same problem, and it finally resolved itself after making what seemed like random changes to the batchfile- I don't understand why but I'll post it here in case it helps someone else later.
I make use of the SysInternals Pskill utility and the sleep utility since XP Home does not include much in terms of commandline functionality.
This is the batchfile that actualy closes after it's done:
@echo off
start /min C:\Progra~1\PsTools\pskill.exe explorer.exe
start /min C:\Progra~1\PsTools\pskill.exe Powermenu.exe
start /min C:\Progra~1\PsTools\pskill.exe PWGen.exe
start /min C:\Progra~1\PsTools\pskill.exe redshiftgui.exe
start /min C:\Progra~1\PsTools\pskill.exe clipx.exe
sleep 2
start explorer.exe
sleep 3
start C:\Progra~1\ClipX\clipx.exe
sleep 1
start C:\Progra~1\Powermenu\PowerMenu.exe
sleep 1
start /min C:\Progra~1\PWGen\PWGen.exe
sleep 1
start C:\Progra~1\RedshiftGUI\redshiftgui.exe && exit
If I had the last few lines changed like this, the cmd window would stay open until I clicked the 'X' in the corner:
start C:\Progra~1\RedshiftGUI\redshiftgui.exe
sleep 1
start /min C:\Progra~1\PWGen\PWGen.exe && exit
Even when I tried to invoke pskill to kill itself, the cmd.exe process would disappear from Task Manager, and pskill would report from inside it's cmd.exe that the cmd.exe process had been killed, yet the cmd.exe
window would still stay up until I clicked the 'X' in the corner:
start C:\Progra~1\RedshiftGUI\redshiftgui.exe
sleep 1
start /min C:\Progra~1\PWGen\PWGen.exe
sleep 1
C:\Progra~1\PsTools\pskill.exe cmd.exe
After I added && exit
to every line, I noticed some of them responded to it and would interrupt the batch processing- while others wouldn't.
So I just put one of the responsive ones at the end instead of how I had it originally.
As I said, I don't know why, but am glad this is over with.