首页 \ 问答 \ Windows任务计划程序批处理文件 - 谁的权限执行批处理文件中的命令?(Windows Task Scheduler Batch File - Whose permissions does commands in batch file take?)

Windows任务计划程序批处理文件 - 谁的权限执行批处理文件中的命令?(Windows Task Scheduler Batch File - Whose permissions does commands in batch file take?)

我正在运行Windows Datacenter,我正在设置一个计划任务,使用md命令在网络上的另一台服务器上创建一个文件夹。 这是我的设置。 我有'用户A'有权登录服务器,但没有权限在任务计划程序中创建任务。 我还有'用户B',他没有登录服务器的权限,但有权创建计划任务。

我创建了一个以“用户A”作为作者When running the task, use the following user account: User B其安全设置为“ When running the task, use the following user account: User B

动作如下:

C:\windows\system32\cmd.exe /c "C:\test.bat"

用程序/脚本作为

C:\windows\system32\cmd.exe

和...的论点

/c "C:\test.bat"

它看起来不像批处理文件。 当任务计划程序调用此批处理文件时,谁正在执行md命令,用户A(登录但没有任务)或用户B(没有登录但是任务)。 我假设如果它是用户B那么可能是问题,用户B可能没有权限写入其他服务器。 非常感谢您提供的任何见解。


I'm running Windows Datacenter, and I'm setting up a scheduled task to create a folder on another server on the network using the md command. Here is my setup. I have 'user A' who has access to log into the server, but does not have permissions to create tasks in Task Scheduler. I also have 'user B' who does not have permissions to log into the server, but does have permissions to create scheduled tasks.

I've created a task with 'User A' as the author with security settings of When running the task, use the following user account: User B.

The action looks like this:

C:\windows\system32\cmd.exe /c "C:\test.bat"

with the Program/script as

C:\windows\system32\cmd.exe

and the arguments of

/c "C:\test.bat"

It doesn't look like the batch file is working. When this batch file is being called by Task Scheduler, who is actually performing the md command, User A (login but no task) or User B (no login but task). I assume if it's User B then that could be the problem, that User B may not have permissions to write to the other server. Any insight you all could provide is greatly appreciated.


原文:https://stackoverflow.com/questions/36038998
更新时间:2022-06-10 13:06

最满意答案

它读取现有的.config文件,并提示用户在当前内核源代码中找不到文件中的选项。 这在使用现有配置并将其移动到新内核时非常有用。


It reads the existing .config file and prompts the user for options in the current kernel source that are not found in the file. This is useful when taking an existing configuration and moving it to a new kernel.

相关问答

更多
  • Make工具最主要也是最基本的功能就是通过makefile文件来描述源程序之间的相互关系并自动维护编译工作。makefile是自己写的,不是安装的。 安装make整个过程可以分为以下几步: 1) 取得应用软件:通过下载、购买光盘的方法获得; 2) 解压缩文件:一般tar包,都会再做一次压缩,如gzip、bz2等,所以你需要先解压。如果是最常见的gz格式,则可以执行:“tar –xvzf 软件包名”,就可以一步完成解压与解包工作。如果不是,则先用解压软件,再执行“tar –xvf 解压后的tar包”进行解包; ...
  • 你将驱动编译成模块的形式,你想kernel启动能加载该驱动模块,就要先通知kernel有这个模块存在,让kernel为加载它做一些准备。所以要配置内核。。。
  • make是一个命令工具,是一个解释makefile中指令的命令工具 makefile一种在工程方面的编译方法
  • 当您通过在控制台上键入#make首次调用Makefile时,您没有传递任何目标。 所以,它会默认调用目标名all:在makefile中。 在all: target中,您将目标作为模块传递。因此,这次它将构建模块而不是转到all: targets。 所以它不会是无限的递归。 When you call the Makefile for the first time by typing #make on the console you are not passing any target. So, It wil ...
  • 从这里的cscope manpage: -P路径在预构建的交叉引用文件中预先放置相对文件名的路径,因此不必切换到构建交叉引用文件的目录。 该选项仅对-d选项有效。 所以我想从顶层内核目录下面的命令应该可以做到这一点(对不起,没有linux机器): cscope -d -P `pwd` 我的2美分, From the cscope manpage here: -P path Prepend path to relative file names in a pre-built cross-reference ...
  • 它读取现有的.config文件,并提示用户在当前内核源代码中找不到文件中的选项。 这在使用现有配置并将其移动到新内核时非常有用。 It reads the existing .config file and prompts the user for options in the current kernel source that are not found in the file. This is useful when taking an existing configuration and movin ...
  • 简单的选择是使用-f : $ make -f Makefile 从man 1 make (GNU make,我推测): 如果不存在-f选项,make将按照该顺序查找makefile GNUmakefile , makefile和Makefile 。 所以你把你的Makefile连接到名字GNUmakefile。 但我的建议,如果你真的想这样做,就是使用别名: $ alias make='make -f Makefile' The easy option is to use -f: $ make -f M ...
  • 将Makefile移动到模块源hello.c所在的位置。 这意味着~/Desktop/inet/ 。 看起来你已将Makefile放在/usr/src/ $ sudo mv /usr/src/Makefile ~/Desktop/inet/ $ cd ~/Desktop/inet/ $ make Move your Makefile to where the module source hello.c is. That means in ~/Desktop/inet/. Looks like you ha ...
  • make config必定存在一些错误,例如磁盘已满,或者您使用Ctrl-C将其中止。 .config文件(不是.conf )位于主目录中。 错误消息已经说明了 *** Please run some configurator (e.g. "make oldconfig" or *** "make menuconfig" or "make xconfig"). 有几个基于文本(config,oldconfig,menuconfig)和图形(xconfig,gconfig)配置程序。 您可能想要选择一个图形 ...
  • 根据ymonad所说,在make -C之前你需要TAB default: make -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules As per ymonad says you require TAB before make -C default: make -C $(KERNEL_DIR) SUBDIRS=$(PWD) modules

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)