Windows station and desktop

Source: Internet
Author: User

Window station and desktop. They are mainly used for services Program General applications do not need to use them. They can be used to protect services. Applications running on different windows stations or different desktop cannot send messages, hook messages, or use the same clipboard. This is mainly for security purposes.


Generally, a service program uses a LocalSystem account with its own window station and default desktop. This window station cannot interact with users. That is to say, you cannot display a window on it, it does not accept users' mouse or keyboard input.

After you log on with a user account, the desktop displayed is default (desktop) under winsta0 (window station ).
Winsta0 has three desktops:
Winlogon: in the form of a logondialog box. When a user crashes, winlogon.exe switches to the default desktop.
Default: This is where the window of assumer.exe and all user programs appears, that is, what we usually see in Windows. The application runs on this desktop.
Screen Saver: runs the screen saver desktop when the system is idle.

You can use the following method to solve your problem so that your service runs on the default (desktop) under winsta0 (window station ):
Desktop --> my computer --> right-click, in the menu that appears, choose "manage" --> Find "services and applications" in the left column --> click "services" --> Find your service on the right, double-click the service, modify properties in the displayed dialog box, and select "allow service and desktop interaction" on the "login" tab. Then, the Service uses winsta0 (window station) under default (desktop ). then you can interact with your service.

However, before doing this, consider it clearly. Because, in this way, your service has security issues, and any other program can send messages to it. for example, if a common program is in the same desktop as your service, it can send you a window to close the message, forcing you to exit the message loop and end the service. alternatively, you can hook your service with a keyboard or mouse ).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.