I've created an application (Python 3.6) with cx_Freeze and when ran as a Python command or even the executable works totally fine.
But if I make the application auto-boot on windows 10 (by creating shortcut in shell:startup) the log file it would create or write to raises PermissionError
. I tried to create a workaround by checking if the file is locked, just add an increment number to the end of the file.
This also works, if I manually make a log file read only, it will create the next one and so on. But with auto boot it raises RecursionError
, so it has probably absolutely no way to write to the disk.
Is there anyway without giving the application Run as administrator
to be able to handle the magic of creating a log file when booting up? :)