如何执行CSCRIPT使用Windows任务调度程序? [英] How to execute cscript using windows task scheduler?

查看:322
本文介绍了如何执行CSCRIPT使用Windows任务调度程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:当我双击它按预期执行.bat文件。当我在Windows任务计划安排它它执行除已CSCRIPT行了。

The problem: When I double click the .bat file it executes as expected. When I schedule it in Windows Task Scheduler it executes except the line that has cscript.

.bat文件内容:

@echo off
cls

cscript CSV_To_Excel.vbs c:\tableaudata\test.csv c:\tableaudata\test.xlsx
echo.file converted >>log.txt

什么是抛我了是log.txt中被创建,表明正在执行的.bat文件的事实。但.XLSX不会创建。然而,在手动双击.BAT的log.txt都和test.xlsx创建。

What is throwing me off is the fact that log.txt gets created indicating that the .bat file is being executed. But .xlsx is not created. However, on manually double clicking .bat both log.txt and test.xlsx is created.

这可能是什么问题?

推荐答案

解决!! 在Windows任务调度程序,我不得不请单击更改用户或组按钮,然后添加Administrators组。

Resolved!! In the windows task scheduler I had to click "change user or group" button and add "Administrators" group.

这篇关于如何执行CSCRIPT使用Windows任务调度程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆