我正在尝试通过批处理文件创建一个 vbs。但是有一条线我包含了一个对象。批处理文件无法将右括号 ) 写入 vbs,这在运行 vbs 时导致错误。
批处理文件代码为:
echo Set oShell = CreateObject("WScript.Shell") >> zipIt.vbs
输出:
echo Set oShell = CreateObject("WScript.Shell"
) 1>>zipIt.vbs
The process cannot access the file because it is being used by another process.
vbs zipIt.vbs
Set oShell = CreateObject("WScript.Shell"
vbs 输出:Microsoft (R) Windows Script Host Version 5.8 版权所有 (C) Microsoft Corporation。版权所有。
C:\Users\arvind\Desktop\zip\zipIt.vbs(1, 42) Microsoft VBScript 编译错误:预期为 ')'