从"user"帐户下运行的服务调用 OpenWindowStation
Calling OpenWindowStation from a service running under a "user" account
我的服务启动了一个交互式客户端进程,类似于下面的内容:https://msdn.microsoft.com/en-us/library/windows/desktop/aa379608(v=vs.85).aspx
当服务登录为本地系统时,它工作,如果它运行在管理员帐户下,具有SE_ASSIGNPRIMARYTOKEN_NAME和SE_ASSIGNPRIMARYTOKEN_NAME和 se_assigne_quota_name 权限。
我的问题是当使用标准用户帐户或本地服务时,它在OpenWindowStation失败,错误码为5 (ACCESS DENIED)。
// Get a handle to the interactive window station.
hwinsta = OpenWindowStation(_T("winsta0"), // the interactive window station
FALSE, // handle is not inheritable
READ_CONTROL | WRITE_DAC); // rights to read/write the DACL
是否可以从标准用户帐户调用OpenWindowStation或我的服务必须在管理员帐户下运行?我尝试了几乎所有的本地策略都没有成功
谢谢!
遗憾的是,这是不可能的,似乎只有管理员才能打开互动站。
相关文章:
- Active Directory:从网络服务帐户下运行的Windows服务调用ADsOpenObject时失败
- 检测win32服务创建和删除的最佳方法
- 使用 mod_gsoap 部署服务时,如何在 Gsoap 中更改 soap 上下文的模式?
- 当服务中的事件被触发时,如何将响应从服务发送回客户端?
- gRPC 生成的代码缺少服务实现
- C# DLL 从C++应用程序调用 SOAP Web 服务
- 在 Winrt/C++ 中使用应用服务
- 将第二个 GATT 服务添加到 Movesense 容器
- 从运行服务的应用程序代码中提取窗口句柄
- 对于使用高级服务的分钟数和应付金额,我不断得到相同的数字
- 通过 Tor 服务C++ socket.io 客户端
- 创建服务失败0x6f7存根收到错误数据
- Windows 后台服务(系统配置文件)无法使用 C++ 访问 win 10 上的用户 appData 文件夹?
- 打开 Docker 撰写文件中每个服务的外壳选项卡
- 在 Linux 上C++:在作为 systemd 服务运行时侦听键盘输入
- 在使用 gSoap 链接多个 SOAP 服务时启用保持活动状态
- 如何使用 sd-bus 获取服务的状态?
- 查找蓝牙设备的服务的 uuid
- 如何使用 CPP REST SDK 实现 CAS(中央认证服务)?
- 在 Windows 服务中使用命名管道时出现问题