This repository was archived by the owner on Apr 18, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -801,8 +801,28 @@ def run_first_time_setup() -> str:
801801# Main Loop
802802# ═══════════════════════════════════════════════════════════════════════════════
803803
804+ def _cleanup_bin_exe ():
805+ """Remove exe from bin directory if it exists (Windows only).
806+ The bin directory should only have .bat/.cmd files that point to the main exe.
807+ Having an exe in bin causes issues because .exe has priority in PATHEXT.
808+ """
809+ if sys .platform != "win32" :
810+ return
811+ try :
812+ app_data = Path (os .environ .get ('LOCALAPPDATA' , '' ))
813+ if app_data :
814+ bin_exe = app_data / "Dymo-Code" / "bin" / "dymo-code.exe"
815+ if bin_exe .exists ():
816+ bin_exe .unlink ()
817+ except Exception :
818+ pass # Silent fail
819+
820+
804821def main ():
805822 """Main entry point"""
823+ # Cleanup old exe in bin directory (Windows PATH fix)
824+ _cleanup_bin_exe ()
825+
806826 # Check for automatic updates before anything else
807827 # This runs silently and restarts if an update is available
808828 if perform_silent_auto_update ():
Original file line number Diff line number Diff line change @@ -83,6 +83,15 @@ def setup_windows() -> Tuple[bool, str]:
8383 exe_path = get_executable_path ()
8484 bat_content = f'@echo off\n "{ python_exe } " "{ exe_path } " %*'
8585
86+ # Remove any exe in bin directory (should only have bat/cmd)
87+ # This prevents conflicts where .exe takes priority over .bat/.cmd in PATHEXT
88+ bin_exe = bin_dir / "dymo-code.exe"
89+ if bin_exe .exists ():
90+ try :
91+ bin_exe .unlink ()
92+ except Exception :
93+ pass # May be in use, will be cleaned up next time
94+
8695 # Create batch file
8796 bat_path = bin_dir / "dymo-code.bat"
8897 bat_path .write_text (bat_content , encoding = 'utf-8' )
Original file line number Diff line number Diff line change 11{
2- "version" : " 0.0.0.38 "
2+ "version" : " 0.0.0.39 "
33}
You can’t perform that action at this time.
0 commit comments