windows-server-2003 – 当服务器运行时,Windows到计划任务的位置是什么?

我的工作服务器有一些每晚运行的计划任务.它们在没有用户登录系统时运行.他们运行批处理文件,打开内置宏的MS-Access数据库.有时脚本不会关闭它们,它们的进程仍在运行,并且它们的.ldb锁定文件会挂起.

我看过他们之前运行过,我看到MS-Access窗口弹出,如果成功完成,则窗口关闭,没有问题.但是,如果失败,则保留锁定文件和进程.我假设也许在某个地方也有一个窗口……我知道在Linux中,如果你的程序在XWindows会话中有一个Window,你可以将它转移到另一个XWindows会话;在Windows上可能是同样的事情?

自从您将标签从Server 2008更改为2003后更改我的答案…我的第一个答案我并不准确.

无论将哪个帐户配置为运行计划任务,每次运行任务时都会为该帐户创建登录会话,为该登录创建一个窗口站,并在该窗口站/登录会话中创建窗口.任务完成后,用户帐户将被注销…当然,系统帐户除外.他们从未注销.

此外,Server 2003没有2008年的会话0隔离.值得注意的是,2008年的工作方式与2003年相比有很大不同.2008年,计划任务由taskeng.exe生成,由svchost.exe生成,这意味着无论任务是否运行,计划任务都在会话0中运行作为SYSTEM或普通用户.但是,如果将任务设置为在2003上以SYSTEM身份运行,则其工作方式与2008年中的任务由会话0中的svchost.exe创建的工作几乎相同.在Server 2003中,会话0只是“控制台”会话,并且您可以使用/ console(/ Vista中的/ admin)通过RDP访问它,然后您将登录到会话0,但它会为您生成一个新的窗口站,因此您将无法看到该计划任务的系统启动的窗口.

在Vista / 2008中,此类活动可能会触发交互式服务检测服务,该服务旨在在弹出交互式对话框时将您转移到会话0的桌面,但除非另一个用户同时登录ISD服务提醒.

因此,当您需要迁移10年前的操作系统时,请记住这一点.

来自NTDebugging博客:

What are all these window stations and desktops in Session 0 anyway?

Now that we know how to tweak the sizes of session view space and the
various desktops,it is worth talking about why you have so many
window stations and desktops,particularly in session 0. First off,
you’ll find that every WinSta0 (interactive window station) has at
least 3 desktops,and each of these desktops uses various amounts of
desktop heap. I’ve alluded to this previously,but to recap,the
three desktops for each interactive window stations are:

· Default desktop – desktop heap size is configurable as
described below

· Disconnect desktop – desktop heap size is 64k on 32-bit
systems

· Winlogon desktop – desktop heap size is 128k on 32-bit
systems

Note that there can potentially be more desktops in WinSta0 as well,
since any process can call CreateDesktop and create new desktops.

Let’s move on to the desktops associated with non-interactive window
stations: these are usually related to a service. The system creates
a window station in which service processes that run under the
LocalSystem account are started. This window station is named
service-0x0-3e7$. It is named for the LUID for the LocalSystem
account,and contains a single desktop that is named Default. However,
service processes that run as LocalSystem interactive start in Winsta0
so that they can interact with the user in Session 0 (but still run in
the LocalSystem context).

Any service process that starts under an explicit user or service
account has a window station and desktop created for it by service
control manager,unless a window station for its LUID already exists.
These window stations are non-interactive window stations. The window
station name is based on the LUID,which is unique for every logon.
If an entity (other than System) logs on multiple times,a new window
station is created for each logon. An example window station name is
“service-0x0-22e1$”.

来自旧的MS KB:

A Microsoft Windows NT,Windows 2000,and Windows XP service has a
Window station and Desktop combination associated with it. This is
based on which account the service is running in:

•If the service is running in the LocalSystem account and is not interactive (that is,
the service type does not include the SERVICE_INTERACTIVE_PROCESS
flag),the service will use the following Window station and Desktop:
Service-0x0-3e7$\default where “Service-0x0-3e7$” is the name of the
Window station and “default” is the name of the desktop.

This is a noninteractive Window station.

•If the service is running
in the LocalSystem account and is interacting with the desktop (that
is,the service type includes the SERVICE_INTERACTIVE_PROCESS flag),
the service will use the following Window station and Desktop:
Winsta0\default This is an interactive Window station.

•If the
service is running in the security context of a user account,the
system will create a unique noninteractive Window station and Desktop
for that service. The name of the Window station will be based on the
Logon Security Identifier (SID) of the user:

Service-0xZ1-Z2$\default where Z1 is the high part and Z2 is the low
part of the Logon SID. Additionally,two services that are running in
the same security context (same service account name) will not receive
the same Window station and Desktop because Logon Security
Identifier’s(SID) are unique to that logon session.

没有办法将进程及其所有窗口传递到另一个用户的会话中,或以某种方式将其注入到桌面中……至少没有一些主要的编程……这将是一个非常有趣的程序.

最后,对Mark Russinovich’s blog这篇文章的评论非常有趣和相关:

The question was whether a thread could call SetThreadDesktop after it had already been assigned to a desktop by the window manager. I wrote some test code just now and it confirmed my recollection. If a thread has ever created a window on one desktop,even if that window has since been destroyed,it will never be allowed to SetThreadDesktop() to a different desktop and create windows there.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


文章浏览阅读2.2k次,点赞6次,收藏20次。在我们平时办公工作中,很多时候我们经常会使用到虚拟机来进行环境的测试,我们平时在虚拟机上接触的最多的莫过于Linux和Winwdos。不过虚拟机环境和物理机环境是无法直接传输的,那么有的时候呢,同学们又想要在两者之间相互传输文件,可能就会使用QQ邮箱等形式来传输,这样的效率又慢而且繁琐,今天我就为大家带来一种非常便捷的传输方式。通过XFTP工具来进行文件传输。_xftp连接windows
文章浏览阅读1k次。解决 Windows make command not found 和 安装 GCC 环境_windows下载gcc
文章浏览阅读3.2k次,点赞2次,收藏6次。2、鼠标依次点击“计算机配置“ - ”管理模板“ - ”网络“ - ”Lanman工作站”,点击右侧的“启用不安全的来宾登录”策略。Windows访问samba共享时,提示“你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问”1、键盘按下window+R键,输入gpedit.msc,启动本地组策略编辑器。首先在终端中输入sudo ufw status查看当前防火墙状态。默认状态是“未配置”,修改为“已启用”。示例:创建一个narada的目录在/home下。1.更新apt储存库列表。_ubuntu samba 目标文件夹访问被拒绝
文章浏览阅读1.3w次。蓝光版属于高清版的一种。BD英文全名是Blu-ray Disc,一种高清的电影版本,这种电影十分清晰但是数据量巨大,占数十G甚至上百G的容量,只有蓝光光碟才能装得下,所以这种高清电影被称为BD版。一般的高清电影多半是从蓝光电影、国外的高清电视频道上压制而来的,可以通过网络下载,多数都经过二次压缩,画质要逊于原视频,不过压缩后的容量从蓝光的25G-50G会减少成4G-8G等(15G-20G不等)。众所周知,视频有两种常见的清晰度,BD和HD,在看电影的时候最常出现这两个标志,那么BD和HD具体指的是什么呢?_bd hd
文章浏览阅读974次,点赞7次,收藏8次。提供了更强大的功能,因为它允许直接访问当前元素,而不需要类型转换。接口,它可以提供一个迭代器,用于按顺序访问集合中的元素。接口是只读的,它只能支持前向迭代,不能修改集合中的元素。类型的集合实例,并向其中添加了几个元素。接口,可以创建一个能够迭代访问泛型集合中元素的迭代器。接口,我们可以在 C# 中实现可迭代的集合,并使用。循环和迭代器手动遍历集合,并输出每个元素的值。接口表示一个可枚举的集合,它定义了一个方法。属性,用于获取集合中当前位置的元素。存储集合中的元素,并实现了。的泛型集合类,它实现了。
文章浏览阅读1.4w次,点赞5次,收藏22次。如果使用iterator的remove方法则会正常,因为iterator的remove方法会在内部调用List的remove方法,但是会修改excepedModCount的值,因此会正常运行。因为遍历过程中进行remove 操作时,该位置后面的元素会挤到前面来,这时候会发生一种情况就是原来元素的位置会被他后面的元素取代,而该位置已经遍历过了,所以该元素不会背遍历。当我们倒序遍历元素的时候,无论删除元素之后的元素怎么移动,之前的元素对应的索引(index)是不会发生变化的,所以在删除元素的时候不会发生问题。_list删除某个元素
文章浏览阅读2.9w次,点赞45次,收藏192次。Windows下配置Visual Studio _vs2022环境变量配置
文章浏览阅读7w次,点赞162次,收藏778次。pip 是Python包管理工具,提供了对 Python 包的查找、下载、安装、卸载的功能,目前Python 3.4 和 2.7 及以上版本都有配套安装,一般pip的位置在...pythonScripts文件夹里面,而在其他版本需要自行下载。_python pip install安装
文章浏览阅读5.8k次,点赞2次,收藏12次。①此电脑右击----->选择属性----->高级系统设置----->环境变量----->path----->编辑----->新建。第一个选项意思就是将安装路径填入到系统环境变量中,这里勾选,后面使用可能会出现问题,建议不要勾选,安装好之后手动添加环境变量。注意:如果提示conda不是内部或外部命令,原因是Anaconda的环境变量没配置好。如果不想立即打开anaconda,不勾选直接finish就好。②输入 conda --version ,查看conda环境。②直接按win键,搜索“环境变量”_windows安装anaconda
文章浏览阅读5.1k次,点赞8次,收藏55次。Windows 系统从零配置 Python 环境,安装CUDA、CUDNN、PyTorch 详细教程_windows cuda cudnn配置
文章浏览阅读1.5w次,点赞54次,收藏68次。macOS系统自带有VNC远程桌面,我们可以在控制端上安装配置VNC客户端,以此来实现远程控制macOS。但通常需要在不同网络下进行远程控制,为此,我们可以在macOS被控端上使用cpolar做内网穿透,映射VNC默认端口5900,通过所生成的公网地址,来实现在公网环境下远程控制VNC。_vnc mac
文章浏览阅读2.4k次,点赞5次,收藏11次。进入后根据自己的电脑系统下载,这是python 3.10版本下载地址,如果想要下载其它版本可进入此链接(下载完成后点击进行安装点击下一步,到这一步时,可以选择将Anaconda添加我的PATH环境变量中,这样就不用自己手动配置和环境变量。安装完成后,打开终端,输出 python 命令可查看是否安装成功。如果显示自己刚才安装的版本号说明安装成功。查看conda版本命令:conda info。_paddlespeech下载
文章浏览阅读3.3k次。所以如果要删除之前新增的课程编译原理,只需输入命令del Course:8:Cname,同时还应该把本课程的学分删除del Course:8:Ccredit,如下图所示;Redis并没有修改数据的命令,所以如果在Redis中要修改一条数据,只能在使用set命令时,使用同样的键值,然后用新的value值来覆盖旧的数据。先调用get命令,输出原先的值,然后set新的值,最后再get得到新值,所以修改成功。输入命令后没有报错,表示成功了,刷新windows的服务,多了一个redis服务。_redis windows服务
文章浏览阅读2.1w次,点赞9次,收藏56次。​​接着在【工作负荷】中,选择【使用C++桌面开发】 ,右边【安装详细信息】去除其它可选项,只勾选【MSVCv142 】和 【Windows 10 SDK】,按图示修改,然后右下角点击安装,之后会有提示让你重启电脑。重启电脑之后,再进行pip安装。报错原因是pip所安装的包需要使用C++编译后才能够正常安装,但是当前安装环境中缺少完整的C++编译环境,因此安装失败。3.安装Microsoft Visual C++ Build Tool离线安装包(1个多G),CSDN资源很多,需要积分下载,_error: microsoft visual c++ 14.0 or greater is required. get it with "micros
文章浏览阅读1.1w次,点赞3次,收藏7次。Step 3: 在右侧窗口中找到名称为“LongPathsEnabled”的“DWORD (32 位) 值”条目,并双击它。通过注册表方法或组策略方法启用长路径支持后,您将能够在 Windows 中使用长路径,并能够访问和处理长路径下的文件和文件夹。Step 2: 依次选择“计算机配置” > “管理模板” > “系统” > “文件资源管理器”。Step 3: 找到“启用 Win32 长路径”设置,双击它。Step 4: 选择“已启用”选项按钮,然后选择“应用”按钮。_windows长路径支持
文章浏览阅读2.5k次,点赞81次,收藏86次。
文章浏览阅读1.3k次,点赞65次,收藏50次。顺序表,链表,栈,队列,ArrayList,LinkedList,Stack,Queue
文章浏览阅读2.3k次,点赞2次,收藏2次。AnyTXTSearcher是一款能够帮助我们对文档以及文本内容进行快速搜索和管理的工具,通过该软件能够搜索各种Office文档,文本文件,代码,PDF文档等,顶级的全文搜索引擎1秒钟之内即可完成搜索。_anytxt searcher
文章浏览阅读8.8k次,点赞73次,收藏70次。有时,在删除/移动/重命名文件夹/文件时,会遇到如下警告,即使将打开的程序关闭了,后台也可能会有没关干净的相关进程。_解除占用
文章浏览阅读4.3w次,点赞91次,收藏102次。JDK(Java Development Kit)是Java开发工具包的缩写,包含了Java编译器、Java虚拟机、Java类库等众多组件,是Java开发的基石,提供了编写、编译和运行Java程序所必需的工具。同时,为了让系统能够正确识别Java环境,在开始使用JDK进行Java开发之前,需要先把JDK安装到本地计算机,并配置好相应的环境变量。本文将介绍JDK安装与环境变量配置的方法。_windows安装jdk并配置环境变量