XP Embedded 尝试将应用程序作为服务启动
当我在 XP Embedded 上运行我正在编写的应用程序时,我在尝试以管理员身份启动应用程序时遇到很多问题。
该应用程序作为有限用户帐户的外壳运行,并且没有触摸屏和键盘,只需一个用户命令即可运行触摸屏供应商的校准工具。这必须以管理员身份运行。
我认为没问题,将用户和密码信息添加到 ProcessStartInfo 中,一切都应该没问题。不。我得到的错误是:
System.ComponentMode.Win32Exception: The specified service does not exist as an installed service.
通过一些调查,我发现:
- 我的进程起始代码是正确的:
- 以受限用户身份运行时,任何应用程序都可以在 XP Embedded 上成功启动
- 任何应用程序都可以在我自己的笔记本电脑上以管理员身份运行
- ,任何应用程序都被视为服务同样的方式,包括记事本,
- 如果我尝试从进程资源管理器中启动程序,我只会得到
“无法执行进程:访问被拒绝”
我不是无论如何,XP Embedded 专家所以我非常感谢一些帮助。我怀疑在构建 XP 映像时设置了一个配置设置,专门拒绝访问进程创建,并且我报告的错误实际上是来自不采用 XP Embedded 错误代码的软件的错误报告。
不幸的是,制作基础图像的人现在不在,所以我无法获取当前的设置。
如果有人以前见过这个,请提前致谢!
凯夫
I'm having a lot of problems trying to start an application as administrator on an application I'm writing when running it on XP Embedded.
The application runs as the shell for a limited user account and is touch-screen and keyboard-less with one user command being to run the touch screen vendor's calibration tool. This must be run as administrator.
No problem I thought, add user and password information to the ProcessStartInfo and all should be fine. No. The error I get is:
System.ComponentMode.Win32Exception: The specified service does not exist as an installed service.
From some investigation, I've found that:
- My Process starting code is correct:
- any application can be started successfully on XP Embedded when run as the limited user
- any application can be run as Administrator on my own laptop
- on XP Embedded, any application is regarded as being a service in the same way, including notepad
- if I attempt to start a program from within process explorer, I simply get
"Unable to execute process: Access is Denied"
I'm not an XP Embedded expert in anyways so I'd very much appreciate some help. I suspect that there's a configuration setting that has been set when building the XP image that specifically denies access to process creation and that the errors I'm being reported are actually mis-reports from software that's not assuming XP Embedded error codes.
Unfortunately, the people who make the base image aren't around right now so I can't get the current settings.
Thanks in advance if anyone's ever seen this before!
Kev
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据记录,结果表明映像中未安装“辅助登录”服务。
我最终到达的代码是
CreateProcessWithLogonW
或CreateProcessAsUser
,它们最终取决于此服务的运行。 “指定服务”错误是准确的,但与我想象的不一样。不知道为什么我从 Process Explorer 收到这个特定错误。For the record, it turned out that the "Secondary Logon" service wasn't installed in the image.
The code I had reached down eventually into either
CreateProcessWithLogonW
orCreateProcessAsUser
which ultimately depend on this service running. The "specified service" error was spot on, but not about what I thought it was about. No idea why I got that particular error from Process Explorer.