any way to close the GUI in tray from command line? Topic is solved

FAQ, getting help, user experience about PrimoCache
Post Reply
klepp0906
Level 4
Level 4
Posts: 25
Joined: Wed Feb 23, 2022 10:30 am

any way to close the GUI in tray from command line?

Post by klepp0906 »

So im trying to properly/gracefully exit fancyccv.exe via CLI to use in a batch file. it seems

Code: Select all

taskkill /im fancyccv.exe
wont do it. i have to use

Code: Select all

taskkill /f /im fancyccv.exe
which gives me pause if theres a way to do it without forcing it closed.
klepp0906
Level 4
Level 4
Posts: 25
Joined: Wed Feb 23, 2022 10:30 am

Re: any way to close the GUI in tray from command line?

Post by klepp0906 »

also, what is the option/switch to start the GUI minimized to tray please? I'm using the following and if i run the batch file, it will re-open the GUI but not minimized.

if i run it from task scheduler, it will re-open fancyccv but it will not be in the tray, can only see it re appear in task manager.

the intended use is to schedule closing of the gui if its running, pause the caches for a set period of time, unpause the caches, then re-open the gui minimzed to the tray.

Code: Select all

@echo off
taskkill /f /im fancyccv.exe
cd "C:\Program Files\PrimoCache"
rxpcc pause -a -s
timeout 28800
rxpcc resume -a -s
start fancyccv.exe
User avatar
Support
Support Team
Support Team
Posts: 3633
Joined: Sun Dec 21, 2008 2:42 am

Re: any way to close the GUI in tray from command line?

Post by Support »

klepp0906 wrote: Mon Mar 07, 2022 9:44 am it seems

Code: Select all

taskkill /im fancyccv.exe
wont do it.
This works if the option "Minimize to the system tray when closed" is not checked. Otherwise it is just minimized to the system tray.
User avatar
Support
Support Team
Support Team
Posts: 3633
Joined: Sun Dec 21, 2008 2:42 am

Re: any way to close the GUI in tray from command line?

Post by Support »

klepp0906 wrote: Mon Mar 07, 2022 9:51 am also, what is the option/switch to start the GUI minimized to tray please?
start fancyccv.exe -tray
klepp0906
Level 4
Level 4
Posts: 25
Joined: Wed Feb 23, 2022 10:30 am

Re: any way to close the GUI in tray from command line?

Post by klepp0906 »

thank you for the replies. so it sounds like i will have to choose one or the other basically. I cant have it close gracefully and still have it close to the tray while in use then.

any drawbacks to forcing it closed? it runs as a driver/service right? so forcing closed the gui shouldnt have any implications?
User avatar
Support
Support Team
Support Team
Posts: 3633
Joined: Sun Dec 21, 2008 2:42 am

Re: any way to close the GUI in tray from command line?

Post by Support »

The gui program is just a user interface to create/close the cache task. It is not necessary to run after you create cache tasks. Caching tasks are working in the driver level. So no harmful to force it closed.
Post Reply