gpt4 book ai didi

c++ - 在 windows7 上从 windows 服务执行 Notepad.exe 问题

转载 作者:行者123 更新时间:2023-11-30 04:33:26 26 4
gpt4 key购买 nike

我已经创建了在 noteapad.exe 上执行 ShellExecute 命令的 Windows 服务。安装服务后,将执行 notepad.exe,并且只能在任务管理器中看到。 Notepad.exe 窗口不可见。任何人都可以让我知道这可能是什么问题,我已经在 Windows XP 上尝试过它工作正常。

以下是ShellExecute的代码

::ShellExecute(NULL,
NULL,
_T("notepad.exe"),
_T("C:\\Users\\testuser\\Desktop\\review_comments.txt"),
_T("C:\\Windows\\System32"),
SW_SHOWMAXIMIZED);

提前致谢

最佳答案

从 Vista 和 Windows Server 2003 开始​​,不再允许服务显示窗口。(并且执行的记事本仍然归服务所有...)

第一个

马里奥

关于c++ - 在 windows7 上从 windows 服务执行 Notepad.exe 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6869814/

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