ID:181259
 
Well, I were looking for a way to close all unused dream daemon's running, and this command line is what I could come up with after seeing how taskkill works.

taskkill /F /FI "WINDOWTITLE eq Dream Daemon" /IM dreamdaemon.exe

Well, that kills the unused DreamDaemon when they're in a window, but not minimized.
So, I'm wondering if there's some way to make it kill the minimized non-hosting running DreamDaemon tasks on windows?
taskkill /f /im dreamdaemon.exe
In response to Ripiz
Sorry if I weren't clear with what I were trying to say, but I'm looking for to kill the DD's that are not hosting, that'd kill all dreamdaemons....
In response to Enic
Then the only way is to use window title, as you were doing. But it'll work only if it's not minimized. There's no other way.
In response to Ripiz
Damn... well, it wont detect the window title when it's minimized :/ Thanks for the reply..
In response to Enic
Would it be possible to have a command that maxes the dreamdaemons, and then run that taskkill to kill the ones titled "Dream Daemon"? I've been trying to find a command to maximize a running process, but couldn't find anything...
In response to Enic
I think you'd have to inject into process to maximize it, batch can't do injection.
In response to Enic
I just used the WinAPI window-handling functions in C to see if there was a simple solution to this there. I enumerated through all existing windows, and while the DD window is "minimized" it does not seem to exist, not just existing but hidden, so perhaps the window is destroyed every time it is minimized and recreated when recalled.

That is my conclusion after poking at it for a few minutes. So you'll probably have to send a message to the taskbar's icon for DD. If you want to continue down that path, you can start here:
http://msdn.microsoft.com/en-us/library/ ee330740%28v=vs.85%29.aspx

So you'd send a message to the notification icon to get the DD window to pop up, then you'd do the other stuff you're trying to do.
In response to Loduwijk
Thanks for the reply Loduwijk, I'll see what I can do... I'm not really a programmer of C but I'm intending to learn that language. Hopefully this'll be something easy to do..