DMU50_GUI_PY/EXEC_MAIN.ps1
2025-03-03 11:08:19 +01:00

17 lines
462 B
PowerShell

#---------- USER DEFINE --------------
$venvName = "dmu50_wingui"
$scriptPath = "./MAIN.py"
#-------------------------------------
# Get the current username
$username = [System.Environment]::UserName
# Construct the path to the Python executable
$pythonExe = "C:\Users\$username\AppData\Local\miniconda3\envs\$venvName\python.exe"
# Execute the Python script
& $pythonExe $scriptPath
# Pause at the end of the script
Read-Host -Prompt "Press Enter to exit"