Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Running CMD windows silently #212
Runs great, however there are three windows that will stay open on launch.
For those with cluttered task bars, this may become an issue. This windows cannot be closed of course because then the application will fail.
Currently running Windows 10 with Activity Watch v0.8.0b5
Woah, that's a lot of people that have +1'd!
Unfortunately I don't have a Windows machine available at the moment (my Windows installation broke a few weeks ago
I just tried to run v0.8.0b5 in Wine (which worked great, apart from ActivityWatch/aw-watcher-window#35) but to my surprise that didn't open separate console windows.
I tried to download a Windows VM from this link: https://developer.microsoft.com/en-us/windows/downloads/virtual-machines
But, to my utter surprise, the download buttons do nothing. Am I just stupid or do they actually not work? (tried in Chrome and Firefox) Someone please tell me I'm not the only one.
The buttons seem not to work, but the links in the source code seem fine:
<button class="c-action-trigger c-glyph glyph-download f-heavyweight x-hidden-focus" role="button" href="//aka.ms/windev_VM_vmware">VMWare</button> <button class="c-action-trigger c-glyph glyph-download f-heavyweight" role="button" href="//aka.ms/windev_VM_hyperv">Hyper-V</button> <button class="c-action-trigger c-glyph glyph-download f-heavyweight" role="button" href="//aka.ms/windev_VM_virtualbox">VirtualBox</button> <button class="c-action-trigger c-glyph glyph-download f-heavyweight" role="button" href="//aka.ms/windev_VM_parallels">Parallels</button>
With Windows there are a few ways to run programs as a background process. This can be done by creating two files.
Dim WShell Set WShell = CreateObject("WScript.Shell") WShell.Run """" & "aw-server.exe" & """", 0 WShell.Run """" & "aw-watcher-afk.exe" & """", 0 WShell.Run """" & "aw-watcher-window.exe" & """", 0 'WShell.Run """" & "aw-qt.exe" & """", 0 Children still open Set WShell = Nothing
Since All modern Windows versions have VBScript support, this is pretty much guaranteed to work.
This second file is really optional if you want to start the services hidden from a icon rather than through the command line. Either one you choose, you can also do so during startup. I would recommend through the Task Scheduler; run the batch file at login. The only issue with this is that there is no icon for the service module, so to close ActivityWatch the user needs to use task manager.
Food for thought
Currently aw-qt.exe does not check if the services are running already, though could this be changed to allow users to still utilize the manager? This would not only solve the temporary solutions problem, but also fix something that may need to be done already.
I've been looking into how to do this the proper way.
Here's a detailed answer about what can go wrong: https://stackoverflow.com/questions/24455337/pyinstaller-on-windows-with-noconsole-simply-wont-work
referenced this issue
Aug 27, 2018
Try the v0.8.0b6 release and let me know if it works!