![]() |
1
2
一个简单的答案是使用
看起来像是: >usermessage.vbs ECHO WScript.Echo^( "Generating report - this may take a moment." ^) start WSCRIPT.EXE usermessage.vbs echo This text is a proxy for the hard work of writing the report
唯一的区别是使用
这两个问题都很容易处理: @echo off setlocal set msg="%TMP%\tempmsg.vbs" ECHO WScript.Echo^( "Generating report - this may take a moment." ^) >%msg% start WSCRIPT.EXE /I /T:15 %msg% echo This text is a proxy for the hard work of writing the report ping -n 5 127.0.0.1 >NULL del %msg% >NUL 2>&1
在这里,我将临时脚本移到
这个
编辑:
约翰内斯·R·塞勒对
这可以很容易地证明: C:> type seta.bat @set A=SomeValue C:> set A ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\Ross\Application Data C:> seta.bat C:> set A A=SomeValue ALLUSERSPROFILE=C:\Documents and Settings\All Users APPDATA=C:\Documents and Settings\Ross\Application Data C:> |