-
-
Notifications
You must be signed in to change notification settings - Fork 593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running CMD windows silently #212
Comments
I have the same problem, is there a solution? |
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 😢), but if anyone wants to try and create a fix I can give some pointers (provided you've been able to build activitywatch on Windows already). |
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> |
Temporary SolutionWith Windows there are a few ways to run programs as a background process. This can be done by creating two files. hiddenServices.vbs 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. runAsProcess.bat wscript "hiddenServices.vbs" 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 thoughtCurrently 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 Options
|
Okay, so I might have fixed it in ActivityWatch/aw-qt#39. I'm going to do some more testing to make sure it doesn't break stuff and then I'll make a release for v0.8.0b6 which will include the change. |
Try the v0.8.0b6 release and let me know if it works! https://github.com/ActivityWatch/activitywatch/releases/tag/v0.8.0b6 |
I've confirmed in my VM that v0.8.0b6 solves the problem! Thank you everyone for you patience 🎉 🎉 🎉 |
Working on my end: Windows 10 |
Same, bravo! Win10 |
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
The text was updated successfully, but these errors were encountered: