how to batch script for cmd exiting then writing to a file

January 27, 2015 at 15:54:02
Specs: Windows 7
i have a chat room batch script i need when i exit the CMD.exe to tell me that the user left ... or the cmd is closed

See More: how to batch script for cmd exiting then writing to a file

Report •

January 27, 2015 at 21:03:31

Report •

January 28, 2015 at 05:35:09
This should be on the Programming forum - I'll ask for it to be shifted there.

Always pop back and let us know the outcome - thanks

Report •

February 1, 2015 at 04:32:51
You can't have CMD do things after it has been terminated. One way around this is to have a small script running in the background, which terminates when the main process is terminated. upon termination, it outputs a message that the user has left. To make the two scripts exchange data, you could have a temporary file which both programs read and get data (Especially the secondary script, which would need the name of the current user etc.).

To have a script running in the background, with no window or interface being displayed, you can use the .Bat to .Exe converter which allows for invisible execution.

If infinity is infinite, is the square root of infinity infinite as well?
- Kurp Von Steiner

Report •
Related Solutions

Ask Question