In the economic crisis, everyone is trying to increase revenue and reduce expenditure. Open source is certainly not that simple. If this is easy, you don't have to wait until now. Therefore, more companies are trying to reduce expenditures.
One of the most recent measures of the company is to call everyone to set the computer to a STANDBY state after work (one of the reasons for not shutting down is that it takes too long to load some software after restarting the machine, who makes the current software bigger and bigger ?), This call is very positive. After all, the power saving not only saves the company unnecessary expenses, but also contributes to the creation of a conservation-oriented society :)
But I have encountered some difficulties with such a small requirement. Because I have two machines sharing one monitor, if the two are used together, either a Remote Desktop quick switch or a hardware switch can be directly switched on the keyboard. Well, the problem is that if I want to make both machines stand by at the same time, I always need to first stand by one of them, and then change to another one (it seems a bit nonsense ......). In this case, Remote Desktop cannot be used, because under the Remote Desktop, I found that there is only the Logout button in the Start menu of the XP system, and the close button cannot be found, so there is no way to stand. If you use a keyboard switch, the problem also occurs because the host in the stand by status will be activated after receiving the keyboard message, so this will not work.
To save power, you have to find a solution. First of all, I want to see if the famous shutdown command has such a function. After all, it is similar. But unfortunately, I checked the information below. Shutdown can only be shutdown, but it cannot be used by specifying parameters to let the system wait. Continue searching and finally find a solution. The command is as follows:
Rundll32.exe powrprof. dll, setsuspendstate 0, 1, 0
Rundll32.exe is known as a DLL loader. In Windows, the DLL can only run after loadlibrary + getprocadress. The DLL powrprof. dll, as its name implies, should be the module responsible for power management. The setsuspendstate behind it is a function in it, and its prototype is as follows:
BOOLEAN WINAPI SetSuspendState( __in BOOLEAN Hibernate, __in BOOLEAN ForceCritical, __in BOOLEAN DisableWakeEvent);
Therefore, the meanings of the following three parameters should be clear at a glance.
Okay, save a. CMD file on the desktop, you can directly stand by in the Remote Desktop, done.