File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ @ echo off
2+ REM Workaround for start with UAC
3+ start " " " %~1 "
4+ exit
Original file line number Diff line number Diff line change @@ -31,3 +31,14 @@ def get_tray_icon() -> str:
3131 str: The path to the tray icon file.
3232 """
3333 return f"{ get_root ()} /resources/app.ico"
34+
35+
36+ def get_startup_script () -> str :
37+ """
38+ Returns the path to the startup script.
39+
40+ Returns:
41+ str: The path to the startup script.
42+ """
43+ return f"{ get_root ()} /resources/startup.bat"
44+
Original file line number Diff line number Diff line change 33
44import winshell
55
6+ from util .path import get_startup_script
7+
68
79def startup_link_path ():
810 """
@@ -31,13 +33,11 @@ def create_startup_link():
3133 return
3234
3335 with winshell .shortcut (link_path ) as link :
34- link .path = f"\" { sys . executable } \" "
36+ link .path = f"\" { get_startup_script () } \" "
3537 link .description = "Process Governor"
3638 link .icon_location = (sys .executable , 0 )
3739 link .working_directory = os .getcwd ()
38-
39- if not getattr (sys , 'frozen' , False ):
40- link .arguments = f"\" { sys .argv [0 ]} \" "
40+ link .arguments = f"\" { sys .executable } \" "
4141
4242
4343def remove_startup_link ():
You can’t perform that action at this time.
0 commit comments