close an open program

Here you are welcome to discuss items of general interest related to Push2Run
Post Reply
kippy
Posts: 1
Joined: Tue Mar 23, 2021 11:00 pm

close an open program

Post by kippy »

hi all.

is there a way to close an open program, maybe....
If I can easily configure commands to open why can't I just as easily create commands to close?

Thanks!
RobLatour
Site Admin
Posts: 1003
Joined: Mon Feb 19, 2018 11:43 am

Re: close an open program

Post by RobLatour »

There are challenges with respect to closing a program that don't apply when you are opening it.

For example, if you want to open Excel, then you can just open it. If there are is already a copy of Excel running, no problem, you can just open another. However, if Excel is running, and you want to close it then the first question might be what happens if there are multiple instances of Excel running, which one do you want to close - perhaps one, perhaps some, perhaps all? Also, to keep it simple, let's assume there is only one instance of Excel running, but if it has a spreadsheet open with unsaved changes, what is it that you want to do - close it and abandon the changes or close it and save the changes? You've likely seen the same problem when Windows shuts down - where Windows holds on a response from you.

I just search and found the following as good article to read through: https://superuser.com/questions/727724/ ... ne-windows . It offers some ideas on how to approach it, including the use of some utilities like nircmd, which Push2Run supports.

Hope this helps.
Post Reply