Skip to content

Commit

Permalink
fix(CFBetter_LSPBridge): 修复自启动无效的问题
Browse files Browse the repository at this point in the history
- 修复当程序路径存在特殊符号或者空格时,自启动无效的问题
  • Loading branch information
beijixiaohu committed Nov 17, 2023
1 parent 9dd308c commit 207abcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CFBetter_LSPBridge/server_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def set_startup_run():
Set the startup.
"""
QSetting = QSettings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Run", QSettings.NativeFormat)
QSetting.setValue("CFBetter_LSPBridge", os.path.join(rootUri,"server_gui.exe") + " min")
QSetting.setValue("CFBetter_LSPBridge", '"{}" /background'.format(os.path.join(rootUri,"server_gui.exe")))

@staticmethod
def cancel_startup_run():
Expand Down Expand Up @@ -742,7 +742,7 @@ def closeEvent(self, event):
processManger = ProcessManager()
main_window = MainWindow()
# if is startup run then hide the window
if "min" in sys.argv:
if "/background" in sys.argv:
main_window.tray_icon.show()
else:
main_window.show()
Expand Down

0 comments on commit 207abcc

Please sign in to comment.