- Func _GoRuntime()
- ;安装IT天空一键运行库
- RunWait(@ComSpec & ' /c for /f "delims=," %i in ('dir /b GoRuntime_*.exe') do %i', @ScriptDir & '\GoRuntime\')
- EndFunc
复制代码
这个语句一直调试不通过,有人能帮忙看一下应该怎么优化一下,或者有更简单的代码可以实现,现在我是用了折中的办法,把命令拆开来完成,代码如下:
- Func _GoRuntime()
- ;安装IT天空一键运行库
- RunWait(@ComSpec & ' /c dir /b GoRuntime_*.exe >%temp%\GoRuntime.txt', @ScriptDir & '\GoRuntime\')
- RunWait(@ComSpec & ' /c for /f "delims=," %i in (%temp%\GoRuntime.txt) do "%i"', @ScriptDir & '\GoRuntime\')
- RunWait(@ComSpec & ' /c del /f /q %temp%\GoRuntime.txt', @ScriptDir & '\GoRuntime\')
- EndFunc
复制代码
|