From e209e3a4b97747ca1205442a6d5a876391092e00 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 29 Aug 2026 16:33:49 -0700 Subject: [PATCH] Replace subprocess.Popen with os.startfile on Windows. --- PGUI.pyw | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/PGUI.pyw b/PGUI.pyw index 2bd6069..3582687 100644 --- a/PGUI.pyw +++ b/PGUI.pyw @@ -123,10 +123,13 @@ class PGUILauncher(tkinter.Frame): self.launch_program(self.ready_to_launch.shortcut) def launch_program(self, shortcut): - print('opening application', shortcut.basename) + print('opening shortcut', shortcut.basename) os.chdir(shortcut.parent.absolute_path) - command = f'"{shortcut.absolute_path}"' - subprocess.Popen(command, shell=True) + if os.name == 'nt': + os.startfile(shortcut.absolute_path) + else: + command = f'"{shortcut.absolute_path}"' + subprocess.Popen(command, shell=True) self.quit() def open_pgui_folder(self):