简体   繁体   English

如何从SYSTEM帐户向登录的用户显示MessageBox?

[英]How to display a MessageBox to the logged on user from SYSTEM account?

I want to create an application, which will query the free space from C:\\ and if it is lower then a limit, it should show a messagebox to the user, that he/she should free up some space on C:. 我想创建一个应用程序,该应用程序将查询C:\\的可用空间,如果它小于限制,它将向用户显示一个消息框,他/她应在C:上释放一些空间。 This application would run under the SYSTEM account. 该应用程序将在SYSTEM帐户下运行。 My problem is that this messagebox is not visible to the logged on user. 我的问题是该消息框对于登录用户不可见。 So my question is how can i show a messagebox to the logged on user from SYSTEM account? 所以我的问题是如何显示来自SYSTEM帐户的登录用户的消息框? If someone could provide some example code, i would be very thankfull. 如果有人可以提供一些示例代码,我将非常感激。

Thanks! 谢谢!

You have to write a seperated user interface, try to search for interprocess communication, like Yahia mentioned, thats not the safe way to go. 您必须编写一个单独的用户界面,尝试搜索进程间的通信,就像Yahia提到的那样,这不是安全的方法。 However there is TerminalServices API doing the session switch for you, right now the user would get some notification in taskbar but no user interface at all, thats right. 但是,可以使用TerminalServices API为您进行会话切换,现在用户会在任务栏中收到一些通知,但根本没有用户界面,那就对了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM