如图所示,cmd通过输入自己编写的程序的实际路径,或者将程序放在环境变量中然后在cmd中执行,用start执行,该程序运行时的工作目录都是cmd当前所在目录;在cmd中输入该程序的快捷方式执行该程序,工作目录是该程序所在目录: