7

I give up on giving dr-mentions Windows support.
The code itself works with no modification needed, but I just couldn't find a way to make it automatically run in the background at login.

Wasted multiple hours on figuring out how the Task Scheduler works and what's the XML format for making an importable task that can be put in the installer, almost works, but couldn't find a way to make it run under an arbitrary user WITHOUT admin permissions(for example, if I want to put it on a work computer on which you wouldn't have an administrator account), fine, gave up on it, only admin user it is.

Another(more serious problem) is that it opens up a fucking empty CMD window while the task is running instead of running in the background, and if you close the window it also stops the script. Wasted another multiple hours trying to figure out how to make the thing run without having an annoying CMD window being constantly open on your desktop, gave up.

If you wanna use it on Windows, just run it through Python directly, or put a shortcut for it in your user's 'Startup\' folder.

Comments
  • 3
    I am completely aware these problems are very probably EASILY solvable, I'm not sayin "Muh, Uh, Windis sucks, I don't know how to do a thing, it's wundus fault".

    There are solutions, I just couldn't find them, and I'm not willing to spend more than a day on this.
  • 3
    @SoldierOfCode > 'There are solutions, I just couldn't find them, and I'm not willing to spend more than a day on this.'

    Completely understandable. It's !like you're being paid for this.
  • 3
    been there done it. yeah, can be solved. but I feel you. It's annoying when you don't like the os to fix it for the OS
  • 2
    Does msconfig still exist? But you can set a registry setting in regedit and that will make an application running at boot.

    This it: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run. Add here key with exec command and export the key. You can distribute that file with your app because two times clicking on it installs the key.

    Edit: can be completely outdated info.
  • 2
    When I did this it was on windows 7. I had to run a python script as a service to monitor serial tcp programs that would die. If one died it would restart the process. I don't remember how it worked, but I do remember getting some kind of template for running python as a windows service. Not sure if that is helpful. It has been at least 10 years since I worked on that.
  • 4
  • 4
    Turns out there are worst things than systemd after all.
  • 3
    @Tounai I never got the systemd issues.
Add Comment