我试图将我的游戏引入msg框。但是,我不知道答案。我试过这个解决方案:
@echo off
set /p FileName=
cscript.exe //NoLogo C:beep.vbs /filename:%beep.vbs%
pause
那是在我的test.bat文件中。现在我放入.vbs文件:
x=msgbox("You Are %FileName%?",4,"Confirmation")
然而,当我运行它时,msg框确实出现了,但是无论你放在
中的内容都没有说出变量set /p FileName=
答案 0 :(得分:0)
使用VBScript尝试一下:
@echo off
set /p FileName=PLS Enter Your File Name =
Echo WSH.Echo (msgbox("You Are %FileName%?",4,"Confirmation"))>>Q.vbs
Cls
FOR /F %%A IN ('cscript.exe //NoLogo Q.vbs') DO Set Code=%%A & Del "Q.vbs"
If %Code%==6 Echo Yes
If %Code%==7 Echo No
pause>nul