“Register” an .exe so you can run it from any command line in Windows

后端 未结 17 2613
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 02:38

How can you make a .exe file accessible from any location in the Windows command window? Is there some registry entry that has to be entered?

17条回答
  •  伪装坚强ぢ
    2020-11-28 03:00

    • If you want to be able to run it inside cmd.exe or batch files you need to add the directory the .exe is in to the %path% variable (System or User)
    • If you want to be able to run it in the Run dialog (Win+R) or any application that calls ShellExecute, adding your exe to the app paths key is enough (This is less error prone during install/uninstall and also does not clutter up the path variable)

提交回复
热议问题