Skip to content

Commit

Permalink
fixed startup shortcut working dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Odizinne authored and Flora committed Jun 28, 2024
1 parent 4f25367 commit fa497bc
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/BigPictureTV.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,18 @@ def handle_startup_checkbox(self, state):
self.remove_startup_shortcut()

def create_startup_shortcut(self):
target_path = os.path.join(os.getcwd(), 'bigpicturetv.exe')
target_path = os.path.join(os.getcwd(), 'BigPictureTV.exe')
startup_folder = winshell.startup()
shortcut_path = os.path.join(startup_folder, 'BigPictureTV.lnk')
winshell.CreateShortcut(Path=shortcut_path, Target=target_path, Icon=(target_path, 0), Description="Launch BigPictureTV")
working_directory = os.path.dirname(target_path)

winshell.CreateShortcut(
Path=shortcut_path,
Target=target_path,
Icon=(target_path, 0),
Description="Launch BigPictureTV",
StartIn=working_directory
)

def remove_startup_shortcut(self):
startup_folder = winshell.startup()
Expand Down

0 comments on commit fa497bc

Please sign in to comment.