#---------- 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"