我们有一个具有管理特权的应用程序,除了其他需要管理特权的操作之外)用户可以发送电子邮件。
我们的电子邮件系统是这样的工作:管理运行应用程序将电子邮件字段和启动(通过 createProcess
)进行了访问,我们的电子邮件应用程序调用了实际的电子邮件发送。如果电子邮件完成并准备就绪,它将直接发送,否则将显示Outlook电子邮件表格,以使用户填写缺失字段并发送。
我们的电子邮件应用程序使用 tjclemail
处理电子邮件发送并显示Outlook电子邮件表单。我的问题是:如果Outlook未作为管理员运行,则电子邮件应用程序不会显示Outlook电子邮件表单,我猜是因为它是从管理运行应用程序中调用的,因此它继承了特权。由于Outlook几乎从未作为管理员运行,因此我想找到一种使用普通用户特权来调用 createProcess
的方法,该> ,该特权>从其呼叫者那里继承了管理员特权。
有办法这样做吗?
We have an application that is run with admin privileges, where (apart from other operations that actually require admin privileges) the user can send emails.
Our email system works like this: admin-run application precompiles the email fields and launches (via CreateProcess
) our email application that calls the actual email send. If the email is complete and ready it will send it directly, otherwise it will show the Outlook email form to let the user fill the missing fields and send.
Our email application uses TJclEmail
to handle email sending and showing Outlook email form. My problem is this: the email application won't show the Outlook email form if Outlook isn't run as administrator, I guess because it's called from the admin-run application so it inherits privileges. Since Outlook is hardly ever run as administrator I'd like to find a way to call CreateProcess
with normal user privileges, insted of inheriting admin privileges from its caller.
Is there a way to do so?
发布评论
评论(1)
根据如何从提升的进程启动未提升的进程,反之亦然?:
然后本文继续显示一个获取桌面的
IShellFolderViewDual
接口的示例,并从中创建一个IShellDispatch2
接口,然后调用IShellDispatch2::ShellExecute()
以登录用户身份执行新进程(这基本上是MSDN 上提供的相同示例: 在资源管理器示例中执行):按照如何从提升的进程 redux 启动未提升的进程:
这是该文章中的示例:
Per How can I launch an unelevated process from my elevated process and vice versa?:
And then the article goes on to show an example that gets the desktop's
IShellFolderViewDual
interface, and from that anIShellDispatch2
interface, and then callsIShellDispatch2::ShellExecute()
to execute the new process as the logged-in user (which is basically the same example provided on MSDN: Execute In Explorer Sample):And per How can I launch an unelevated process from my elevated process, redux:
And here is the example from that article: