Windows PowerShell。 通过PowerShell命令运行程序

我想运行文件C:\Python34\python.exe python3的命令和文件C:\Python27\python.exe python命令。 我如何通过PowerShell定义这种行为?

我通常将它添加到我的~\Documents\WindowsPowerShell\profile.ps1string,如:

 $env:Path += ";C:\Program Files\GnuWin32\bin" 

您可以添加文件~\bin\python.bat~\bin\python3.bat ,内容为C:\Python27\python.exeC:\Python34\python.exe ,并添加到您的profile.ps1

 $env:Path += ";C:\Users\<your user>\bin"