【问题标题】:Windows PowerShell. Run program by PowerShell commandWindows PowerShell。通过 PowerShell 命令运行程序
【发布时间】:2016-02-20 23:25:40
【问题描述】:

我想运行文件C:\Python34\python.exepython3的命令和文件C:\Python27\python.exepython命令。如何通过 PowerShell 定义此行为?

我通常将它添加到我的~\Documents\WindowsPowerShell\profile.ps1 字符串中,例如:

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

【问题讨论】:

    标签: windows powershell


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-05
      • 1970-01-01
      • 1970-01-01
      • 2019-10-17
      • 1970-01-01
      • 2018-10-12
      相关资源
      最近更新 更多