It will put a box on the screen saying the system is going to shut down in 30 seconds, and save your work, (and then computer turns off). You have about 15 seconds to abort the shutdown (shutdown -a)
That does shutdown the computer, but it wouldn't correlate with the ".exe" i needed! I googled and tried to learn a bit and i already got it to work!
Start C:\Programas\TVR\TVR\tvr.exe >temp.log
if exist c:\temp.log goto :check
if not exist c:\temp.log goto shutdown
WMIC OS Where Primary=TRUE Call Shutdown
Basicly what it does is to start the ".exe" with a delay of 8 seconds generating a temporary log that the routine tries to delete when possible. When the ".exe" is terminated manually the routine manages to finally delete the log file successfully, making the computer shutdown!
I though it would be nice post this because i did research a lot and who know, it might be useful for someone else.
thaaanks you really helped me at this field but i need to know what if i want to put application on a usb flash memory and made my computer boot from it and read the application and when i eject the usb the computer shutsdown