如下的一段.bat代码,我在桌面编辑好,双击运行没有问题,但是将文件复制到windows启动目录下,开机自启动运行和直接在开始菜单点击运行都会报错"脚本错误,找不到系统文件"
脚本目的是为了延时自动启动C#桌面应用程序
@echo off
if "%1" == "h" goto begin
mshtavbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
REM
@echo off
timeout /t 30
start "" "D:\Debug.exe"

你Debug.exe 在D盘下面有吗?