使用任务计划程序时无法连接到共享驱动器 [英] when using task scheduler cannot connect to shared drive

查看:87
本文介绍了使用任务计划程序时无法连接到共享驱动器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用c#编写的工具,该工具可以运行某些程序,并将日志文件复制到共享文件夹中.我正在使用任务计划程序运行此应用程序,但问题是,当尝试复制到共享文件夹时,任务计划程序似乎没有 使用权.我能够调试并看到它,却不知道如何解决.例如,我不是使用z:\,而是完整路径\\ servername \ ...

I have a tool that I wrote in c# that runs something and the log file is copied to a shared folder. I am running this application with task scheduler but the issue is that when trying to copy to the shared folder, it seems that the task scheduler has no access. I was able to debug and see it and dont know how to solve it. I am not using a z:\ for example but the full path \\servername\...

当我尝试登录此共享文件夹时,在调试任务计划程序正在运行的代码时也可以执行此操作,但是当使用任务计划程序运行该代码时,它未连接并表示该文件夹不存在.我想这是一种安全 问题,但我在此用户中找不到任何安全问题.我知道任务计划程序正在运行的用户与我正在运行的用户不同,因此我添加了批处理文件,该批处理文件在代码开始运行时仍在本地运行,但仍然具有相同的结果....可以 有人指导我是否有解决此问题的方法?

when I am trying to log on to this shared folder I can do it also when debugging the code that the task scheduler is running but when running it using task scheduler it is not connecting saying that the folder not exists. I guess that this is a security issue, but I cannot find any security issue in this user. I know that the task scheduler is running different user then the one that I am on, so I added batch file that is running locally when the code is start running but still has the same results....can anyone guide me if there is a way to solve this issue ?

推荐答案

您好塔尔本,

谢谢您在这里发布.

对于您的问题,也许您是对的.特权有问题.

For your question, maybe you are right. There is something wrong with the privileges.

您可以以最高权限运行.从本质上讲,此选项为任务管理员提供用户帐户控制(UAC)提示所具有的特权.如果你 计划将其用于管理目的,您可能需要启用此选项.

You could run with highest privileges. This option essentially gives the task administrator privileges the same way the User Account Control (UAC) prompt would do it. If you plan to use this for administrative purposes, you will probably want to enable this option.

有关更多详细信息,请参阅 文章.

For more details, please refer to the article.

我希望这会对您有所帮助.

I hope this would be helpful to you.

如果还有其他问题,请随时与我们联系.

If you have something else, please feel free to contact us.

最好的问候,

温迪


这篇关于使用任务计划程序时无法连接到共享驱动器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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