What are you trying to do? Alt-F4 is used to kill a windows process. You would either have to write a script and use the sendkey method, or iterate the running processes and kill it that way. The problem here is that you need a way to direct the alt-f4 key code to the proper application.
Alt-F4 could be a bit of a catch-22. If you use that key combo in an editor, the editor will shutdown! Not too cool.
Some but not all versions of Windows have the
taskkill command, which could be hepful. What version are you using?
In a batch file, use the
exit commmand to shutdown the command window.
Happy computing...