Vbscript 如何在Windows任务计划程序中包含vbs代码?
目前,我正在使用Vbscript 如何在Windows任务计划程序中包含vbs代码?,vbscript,Vbscript,目前,我正在使用将vbs代码包含到Windows任务调度程序中。vbs这样的文件 <Actions Context="Author"> <Exec> <Command>cscript</Command> <Arguments>"c:\users\owner\desktop\test.vbs"</Arguments> </Exec> </Actions>
将vbs
代码包含到Windows任务调度程序中。vbs
这样的文件
<Actions Context="Author">
<Exec>
<Command>cscript</Command>
<Arguments>"c:\users\owner\desktop\test.vbs"</Arguments>
</Exec>
</Actions>
但它没有起作用。
有没有办法将vbs直接写入命令行 cscript.exe
不是用来从输入或类似的东西接收代码的。脚本文件必须存在。cscript.exe
&wscript.exe
被设计为与任何其他.exe文件一样执行脚本(但您可以编写一个来执行)。顺便说一句,您不应该使用该用户路径安排脚本任务!
<Actions Context="Author">
<Exec>
<Command>cscript</Command>
<Arguments>"msgbox ""hi"""</Arguments>
</Exec>
</Actions>