After much searching and sifting through several programs that forcefully terminate processes, I finally located
this article that mentions a simple program named
close that does a great job of asking an application to shut down. I tested it on notepad with some unsaved changes and instead of killing it off, notepad asked if I wanted to save the document. My main focus was for a program called HideIt. It will hide programs automatically, but only when it is first launched. If HideIt is already running, it won't hide the other windows. This is expecially annoying for some scheduled tasks that run that I don't need to see the window or that I don't want to take focus away from what I'm already doing.
Now, the scheduled task launches a batch file. The batch file closes HideIt and then opens HideIt again which hides the batch file from view and returns focus to the previous application (usually something I'm typing). Perfect!
Previously, I had to either wait for the batch file to finish or click back on the window I was keying in text. I had tried using PSKILL from SysInternals, but it left the system tray icon each time and eventually there were several duplicated icons. Now, the icon goes away and comes back so fast it appears to not even change.
( close windows application gracefully )