当我使用批处理文件创建文件invisible.vbs
然后删除时,它会因错误而停止。基本上,我想做的是让批处理文件制作这个文件。
这是我运行批处理文件时遇到的错误:
C:\Users\HP\Desktop>"New Text Document.bat"
CreateObject("Wscript.Shell").Run """"
'WScript.Arguments' is not recognized as an internal or external command, operable program or batch file.
'""""' is not recognized as an internal or external command, operable program or batch file.
这是批处理文件中的内容:
@ECHO OFF
CD /D %~dp0
ECHO\ CreateObject("Wscript.Shell").Run """" & WScript.Arguments(0) & """", 0,False>>Invisible.vbs
::What I want to do with the file is here
DEL %CD%\invisible.vbs /Q /S
我注意到该文件已生成,但它是空的,因此当我尝试使用它使另一个批处理文件不可见时什么也不做。