gpt4 book ai didi

c++ - 从在 "user"帐户下运行的服务调用 OpenWindowStation

转载 作者:行者123 更新时间:2023-11-28 06:10:03 24 4
gpt4 key购买 nike

我的服务使用与此非常相似的东西启动交互式客户端进程:https://msdn.microsoft.com/en-us/library/windows/desktop/aa379608(v=vs.85).aspx

它在服务以本地系统登录时有效,并且在管理员帐户下运行时有效,具有 SE_ASSIGNPRIMARYTOKEN_NAMESE_INCREASE_QUOTA_NAME 权限。

我的问题是在使用标准用户 帐户或本地服务 时,它在OpenWindowStation 失败,错误代码为 5(拒绝访问)。

// 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,或者我的服务必须在管理员帐户下运行?我尝试了几乎所有的 Local Policy 都没有成功

谢谢!

最佳答案

可惜打不开,好像只有Administrator才能打开互动站。

关于c++ - 从在 "user"帐户下运行的服务调用 OpenWindowStation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31457268/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com