import os
import sys

file_path = os.path.dirname(sys.executable)

text = ''
text += 'timeout /t 30 /nobreak\n'
if str(file_path)[0].lower() != 'c':
    text += str(file_path)[0] + ':\n'
text += 'cd ' + str(file_path) + '\n'
# text += f'python {file_path}\console_greate_manager.py'
text += f'start {file_path}\console_greate_manager.exe'
# run_file = open("run_futplus_system.cmd", "w")
# run_file.write(text)
# run_file.close()
run_file = open("C:/ProgramData/Microsoft/Windows/Start Menu/Programs/Startup/run_futplus_system.cmd", "w")
run_file.write(text)
run_file.close()

# python -m PyInstaller --onefile .\install_startup.py
