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
最满意答案
它读取现有的
.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.
相关问答
更多-
linux 5如何安装makefile软件[2022-07-17]
Make工具最主要也是最基本的功能就是通过makefile文件来描述源程序之间的相互关系并自动维护编译工作。makefile是自己写的,不是安装的。 安装make整个过程可以分为以下几步: 1) 取得应用软件:通过下载、购买光盘的方法获得; 2) 解压缩文件:一般tar包,都会再做一次压缩,如gzip、bz2等,所以你需要先解压。如果是最常见的gz格式,则可以执行:“tar –xvzf 软件包名”,就可以一步完成解压与解包工作。如果不是,则先用解压软件,再执行“tar –xvf 解压后的tar包”进行解包; ... -
Linux驱动开发 前 为什么要配置编译内核?[2022-10-22]
你将驱动编译成模块的形式,你想kernel启动能加载该驱动模块,就要先通知kernel有这个模块存在,让kernel为加载它做一些准备。所以要配置内核。。。 -
初学linux。 什么叫make 和 makefile。怎么用?[2022-09-13]
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 ...
-
“make oldconfig”在Linux内核makefile中做了什么?(What does “make oldconfig” do exactly in the Linux kernel makefile?)[2023-06-24]
它读取现有的.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