start.exe 如何工作?

start.exe 如何工作?

我发现 start.exe 可能是一个有用的工具,用于运行已安装程序。因此我可以运行 Word:

start winword # located in "C:\Program Files\Microsoft Office 15\root\office15\WINWORD.EXE"

视觉工作室:

start devenv # located in "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe"

Skype

start skype # located in "C:\Program Files (x86)\Skype\"

水狐

start waterfox #located in "C:\Program Files\Waterfox\waterfox.exe"

甚至 Notepad++

start notepad++ # located in "C:\Program Files (x86)\Notepad++\notepad++.exe"

但它不适用于蒸汽,

PS C:\Users\Павел> start steam
start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
+ start steam
+ ~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

然而 :

>Test-Path 'C:\Program Files (x86)\Steam\Steam.exe'
True

我的$PATH:

/usr/local/bin:/mingw/bin:/bin:/c/Program Files/Far Manager:/c/Program Files/Far Manager/ConEmu:/c/Program Files (x86)/ActiveState Komodo Edit 9/:/c/Python34/:/c/Python34/Scripts:/c/Perl64/site/bin:/c/Perl64/bin:/c/Program Files (x86)/ActiveState Komodo Edit 8/:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0/:/c/Program Files/Microsoft SQL Server/110/Tools/Binn/:/c/Program Files/Microsoft SQL Server/120/Tools/Binn/:/c/Program Files (x86)/CMake/bin:/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/:/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0/:/c/Program Files/SlikSvn/bin:/c/Program Files (x86)/Skype/Phone/:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/ProgramData/chocolatey/bin:/c/Program Files (x86)/GitExtensions/:/c/Ruby21/bin

(我使用 Git Bash 来显示它,因为当我运行 gci 时,PowerShell 似乎缩短了这个长变量)我如何以这种方式运行 Steam?

编辑:在默认安装中,它也不适用于 VLC

答案1

检查您的注册表App Paths子项。它位于 HKCU 和 HKLM 下Software\Microsoft\Windows\CurrentVersion\App Paths。不要忘记 HKLM 中的 32 位和 64 位键。

这个想法是,一些应用程序的安装程序会创建这些密钥,但其他的则不会。

相关内容