Index: base/applications/taskmgr/CMakeLists.txt
===================================================================
--- base/applications/taskmgr/CMakeLists.txt	(revision 63403)
+++ base/applications/taskmgr/CMakeLists.txt	(working copy)
@@ -18,6 +18,7 @@
     trayicon.c
     taskmgr.c
     graphctl.c
+    shutdown.c
     precomp.h)
 
 add_executable(taskmgr ${SOURCE} taskmgr.rc)
Index: base/applications/taskmgr/lang/bg-BG.rc
===================================================================
--- base/applications/taskmgr/lang/bg-BG.rc	(revision 63403)
+++ base/applications/taskmgr/lang/bg-BG.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "На&дипляне", ID_WINDOWS_CASCADE
         MENUITEM "Изваждане &отпред ", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "Помо&щ"
     BEGIN
         MENUITEM "Съдържание на помо&щта за задачния управител", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/cs-CZ.rc
===================================================================
--- base/applications/taskmgr/lang/cs-CZ.rc	(revision 63403)
+++ base/applications/taskmgr/lang/cs-CZ.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Kaskáda", ID_WINDOWS_CASCADE
         MENUITEM "&Přenést do popředí", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Nápověda"
     BEGIN
         MENUITEM "&Nápověda pro správce úloh", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/da-DK.rc
===================================================================
--- base/applications/taskmgr/lang/da-DK.rc	(revision 63403)
+++ base/applications/taskmgr/lang/da-DK.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Cascade", ID_WINDOWS_CASCADE
         MENUITEM "&Bring til front", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Hjælp"
     BEGIN
         MENUITEM "Opgavestyring &Hjælpe Emner", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/de-DE.rc
===================================================================
--- base/applications/taskmgr/lang/de-DE.rc	(revision 63403)
+++ base/applications/taskmgr/lang/de-DE.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "Übe&rlappend", ID_WINDOWS_CASCADE
         MENUITEM "&In Vordergrund", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&?"
     BEGIN
         MENUITEM "&Hilfethemen", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/el-GR.rc
===================================================================
--- base/applications/taskmgr/lang/el-GR.rc	(revision 63403)
+++ base/applications/taskmgr/lang/el-GR.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Cascade", ID_WINDOWS_CASCADE
         MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Βοήθεια"
     BEGIN
         MENUITEM "Θέματα &Βοήθειας του Διαχειριστή Διεργασιών", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/en-US.rc
===================================================================
--- base/applications/taskmgr/lang/en-US.rc	(revision 63403)
+++ base/applications/taskmgr/lang/en-US.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Cascade", ID_WINDOWS_CASCADE
         MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Help"
     BEGIN
         MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/es-ES.rc
===================================================================
--- base/applications/taskmgr/lang/es-ES.rc	(revision 63403)
+++ base/applications/taskmgr/lang/es-ES.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Cascada", ID_WINDOWS_CASCADE
         MENUITEM "&Traer al Frente", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "A&yuda"
     BEGIN
         MENUITEM "&Temas de Ayuda del Administrador de Tareas", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/fr-FR.rc
===================================================================
--- base/applications/taskmgr/lang/fr-FR.rc	(revision 63403)
+++ base/applications/taskmgr/lang/fr-FR.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Cascade", ID_WINDOWS_CASCADE
         MENUITEM "Mettre au &premier plan", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Aide"
     BEGIN
         MENUITEM "&Rubriques d'aide du Gestionnaire des tâches", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/he-IL.rc
===================================================================
--- base/applications/taskmgr/lang/he-IL.rc	(revision 63403)
+++ base/applications/taskmgr/lang/he-IL.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "מדורג", ID_WINDOWS_CASCADE
         MENUITEM "ה&בא לפנים", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&עזרה"
     BEGIN
         MENUITEM "&נושאי עזרה של מנהל המשימות", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/hu-HU.rc
===================================================================
--- base/applications/taskmgr/lang/hu-HU.rc	(revision 63403)
+++ base/applications/taskmgr/lang/hu-HU.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Lépcsõzetes rendezés", ID_WINDOWS_CASCADE
         MENUITEM "&Elõtérbe helyezés", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Súgó"
     BEGIN
         MENUITEM "&Témakörök", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/id-ID.rc
===================================================================
--- base/applications/taskmgr/lang/id-ID.rc	(revision 63403)
+++ base/applications/taskmgr/lang/id-ID.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Cascade", ID_WINDOWS_CASCADE
         MENUITEM "&Bring To Front", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Help"
     BEGIN
         MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/it-IT.rc
===================================================================
--- base/applications/taskmgr/lang/it-IT.rc	(revision 63403)
+++ base/applications/taskmgr/lang/it-IT.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Sovrapponi", ID_WINDOWS_CASCADE
         MENUITEM "&Porta in primo piano", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Aiuto"
     BEGIN
         MENUITEM "Task Manager &Help Topics", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/ja-JP.rc
===================================================================
--- base/applications/taskmgr/lang/ja-JP.rc	(revision 63403)
+++ base/applications/taskmgr/lang/ja-JP.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "重ねて表示(&C)", ID_WINDOWS_CASCADE
         MENUITEM "手前に表示(&B)", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "ヘルプ(&H)"
     BEGIN
         MENUITEM "トピックの検索(&H)", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/ko-KR.rc
===================================================================
--- base/applications/taskmgr/lang/ko-KR.rc	(revision 63403)
+++ base/applications/taskmgr/lang/ko-KR.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "계단식 창 배열(&C)", ID_WINDOWS_CASCADE
         MENUITEM "맨 앞으로 가져오기(&B)", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "도움말(&H)"
     BEGIN
         MENUITEM "작업 관리자 도움말 항목(&H)", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/nl-NL.rc
===================================================================
--- base/applications/taskmgr/lang/nl-NL.rc	(revision 63403)
+++ base/applications/taskmgr/lang/nl-NL.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Trapsgewijs", ID_WINDOWS_CASCADE
         MENUITEM "Naar &voorgrond", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Help"
     BEGIN
         MENUITEM "&Help-onderwerpen", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/no-NO.rc
===================================================================
--- base/applications/taskmgr/lang/no-NO.rc	(revision 63403)
+++ base/applications/taskmgr/lang/no-NO.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Overlappet", ID_WINDOWS_CASCADE
         MENUITEM "&Plasser lengst frem", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Hjelp"
     BEGIN
         MENUITEM "Emner i &hjelp for Oppgavebehandling", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/pl-PL.rc
===================================================================
--- base/applications/taskmgr/lang/pl-PL.rc	(revision 63403)
+++ base/applications/taskmgr/lang/pl-PL.rc	(working copy)
@@ -53,6 +53,17 @@
         MENUITEM "&Kaskadowo", ID_WINDOWS_CASCADE
         MENUITEM "&Przesuń na wierzch", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "Pomo&c"
     BEGIN
         MENUITEM "Menedżer zadań - tematy &pomocy", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/pt-BR.rc
===================================================================
--- base/applications/taskmgr/lang/pt-BR.rc	(revision 63403)
+++ base/applications/taskmgr/lang/pt-BR.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "Em &cascata", ID_WINDOWS_CASCADE
         MENUITEM "&Trazer para a frente", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "Aj&uda"
     BEGIN
         MENUITEM "&Tópicos da Ajuda do Gerenciador de tarefas", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/ro-RO.rc
===================================================================
--- base/applications/taskmgr/lang/ro-RO.rc	(revision 63403)
+++ base/applications/taskmgr/lang/ro-RO.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "Aranjări în casca&dă", ID_WINDOWS_CASCADE
         MENUITEM "&Aduce în prim plan", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&?"
     BEGIN
         MENUITEM "&Manual…", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/ru-RU.rc
===================================================================
--- base/applications/taskmgr/lang/ru-RU.rc	(revision 63403)
+++ base/applications/taskmgr/lang/ru-RU.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Каскадом", ID_WINDOWS_CASCADE
         MENUITEM "&На передний план", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Справка"
     BEGIN
         MENUITEM "&Вызов справки", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/sk-SK.rc
===================================================================
--- base/applications/taskmgr/lang/sk-SK.rc	(revision 63403)
+++ base/applications/taskmgr/lang/sk-SK.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Kaskáda", ID_WINDOWS_CASCADE
         MENUITEM "Presunúť dopred&u", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Pomocník"
     BEGIN
         MENUITEM "Témy &Pomocníka pre Správcu úloh", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/sq-AL.rc
===================================================================
--- base/applications/taskmgr/lang/sq-AL.rc	(revision 63403)
+++ base/applications/taskmgr/lang/sq-AL.rc	(working copy)
@@ -50,6 +50,17 @@
         MENUITEM "Ujevare", ID_WINDOWS_CASCADE
         MENUITEM "Sjelle para", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "Ndihme"
     BEGIN
         MENUITEM "Task Manager &Ndihme me teme", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/sv-SE.rc
===================================================================
--- base/applications/taskmgr/lang/sv-SE.rc	(revision 63403)
+++ base/applications/taskmgr/lang/sv-SE.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "&Överlappande", ID_WINDOWS_CASCADE
         MENUITEM "&För till förgrunden", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Hjälp"
     BEGIN
         MENUITEM "Aktivitetshanteraren &hjälpavsnitt", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/tr-TR.rc
===================================================================
--- base/applications/taskmgr/lang/tr-TR.rc	(revision 63403)
+++ base/applications/taskmgr/lang/tr-TR.rc	(working copy)
@@ -48,6 +48,17 @@
         MENUITEM "B&asamaklandır", ID_WINDOWS_CASCADE
         MENUITEM "&Öne Getir", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Yardım"
     BEGIN
         MENUITEM "&Yardım Konuları", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/uk-UA.rc
===================================================================
--- base/applications/taskmgr/lang/uk-UA.rc	(revision 63403)
+++ base/applications/taskmgr/lang/uk-UA.rc	(working copy)
@@ -46,6 +46,17 @@
         MENUITEM "&Каскадом", ID_WINDOWS_CASCADE
         MENUITEM "На передні&й план", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "&Довідка"
     BEGIN
         MENUITEM "&Зміст", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/zh-CN.rc
===================================================================
--- base/applications/taskmgr/lang/zh-CN.rc	(revision 63403)
+++ base/applications/taskmgr/lang/zh-CN.rc	(working copy)
@@ -52,6 +52,17 @@
         MENUITEM "层叠(&C)", ID_WINDOWS_CASCADE
         MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "帮助(&H)"
     BEGIN
         MENUITEM "任务管理器帮助主题(&H)", ID_HELP_TOPICS
Index: base/applications/taskmgr/lang/zh-TW.rc
===================================================================
--- base/applications/taskmgr/lang/zh-TW.rc	(revision 63403)
+++ base/applications/taskmgr/lang/zh-TW.rc	(working copy)
@@ -54,6 +54,17 @@
         MENUITEM "層疊(&C)", ID_WINDOWS_CASCADE
         MENUITEM "前置(&B)", ID_WINDOWS_BRINGTOFRONT
     END
+    POPUP "Sh&ut Down"
+    BEGIN
+        MENUITEM "Stand &By",                  ID_POWER_SAVING, GRAYED
+        MENUITEM "&Hibernate",                 ID_HIBERNATION, GRAYED
+        MENUITEM "T&urn Off",                  ID_SHUTDOWN
+        MENUITEM "&Restart",                   ID_RESTART
+        MENUITEM "&Log Off %s",                ID_LOGOFF_USER
+        MENUITEM "&Switch user\tWinKey+L",     ID_SWITCH_USER, GRAYED
+        MENUITEM "&Disconnect",                ID_DISCONNECT, GRAYED
+        MENUITEM "&Eject Computer",            ID_EJECT_COMPUTER, GRAYED
+    END
     POPUP "說明(&H)"
     BEGIN
         MENUITEM "工作管理員說明主题(&H)", ID_HELP_TOPICS
Index: base/applications/taskmgr/precomp.h
===================================================================
--- base/applications/taskmgr/precomp.h	(revision 63403)
+++ base/applications/taskmgr/precomp.h	(working copy)
@@ -30,5 +30,6 @@
 #include "optnmenu.h"
 #include "run.h"
 #include "trayicon.h"
+#include "shutdown.h"
 
 #endif /* __PRECOMP_H */
Index: base/applications/taskmgr/resource.h
===================================================================
--- base/applications/taskmgr/resource.h	(revision 63403)
+++ base/applications/taskmgr/resource.h	(working copy)
@@ -180,6 +180,15 @@
 #define ID_PROCESS_PAGE_SETPRIORITY_LOW         32814
 #define ID_PROCESS_PAGE_DEBUGCHANNELS           32815
 
+#define ID_POWER_SAVING                 32817
+#define ID_HIBERNATION                  32818
+#define ID_SHUTDOWN                     32819
+#define ID_RESTART                      32820
+#define ID_LOGOFF_USER                  32821
+#define ID_SWITCH_USER                  32822
+#define ID_DISCONNECT                   32823
+#define ID_EJECT_COMPUTER               32824
+
 #define IDC_STATIC -1
 
 #define IDS_TAB_APPS          310
Index: base/applications/taskmgr/shutdown.c
===================================================================
--- base/applications/taskmgr/shutdown.c	(revision 0)
+++ base/applications/taskmgr/shutdown.c	(working copy)
@@ -0,0 +1,64 @@
+/* Template file for shutdown menu of taskmgr */
+
+#include <precomp.h>
+#include <ndk/pofuncs.h>
+
+VOID
+ShutDown_Privilege(VOID)
+{
+    HANDLE hToken;
+    TOKEN_PRIVILEGES npr;
+
+    if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken))
+    {
+        LookupPrivilegeValueA(0, "SeShutdownPrivilege", &npr.Privileges[0].Luid);
+        npr.PrivilegeCount = 1;
+        npr.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
+        AdjustTokenPrivileges(hToken, FALSE, &npr, 0, 0, 0);
+        CloseHandle(hToken);
+    }
+}
+
+VOID
+ShutDown_PowerOff(VOID)
+{
+    ShutDown_Privilege();
+    ExitWindowsEx(EWX_POWEROFF, EWX_FORCEIFHUNG);
+}
+
+VOID
+ShutDown_Restart(VOID)
+{
+    ShutDown_Privilege();
+    ExitWindowsEx(EWX_REBOOT, EWX_FORCEIFHUNG);
+}
+
+
+VOID
+ShutDown_PowerSaving(VOID)
+{
+    NtSetSystemPowerState(PowerActionSleep,
+                          PowerSystemSleeping1,
+                          0);
+}
+
+VOID
+ShutDown_Hibernation(VOID)
+{
+}
+
+VOID
+ShutDown_SwitchUser(VOID)
+{
+}
+
+VOID
+ShutDown_Disconnect(VOID)
+{
+}
+
+VOID
+ShutDown_Eject_Computer(VOID)
+{
+}
+
Index: base/applications/taskmgr/shutdown.h
===================================================================
--- base/applications/taskmgr/shutdown.h	(revision 0)
+++ base/applications/taskmgr/shutdown.h	(working copy)
@@ -0,0 +1,27 @@
+/* Template header file for shutdown menu of taskmgr */
+
+#ifndef __SHUTDOWN_H
+#define __SHUTDOWN_H
+
+VOID
+ShutDown_PowerOff(VOID);
+
+VOID
+ShutDown_Restart(VOID);
+
+VOID
+ShutDown_PowerSaving(VOID);
+
+VOID
+ShutDown_Hibernation(VOID);
+
+VOID
+ShutDown_SwitchUser(VOID);
+
+VOID
+ShutDown_Disconnect(VOID);
+
+VOID
+ShutDown_Eject_Computer(VOID);
+
+#endif /* __SHUTDOWN_H */
Index: base/applications/taskmgr/taskmgr.c
===================================================================
--- base/applications/taskmgr/taskmgr.c	(revision 63403)
+++ base/applications/taskmgr/taskmgr.c	(working copy)
@@ -53,7 +53,7 @@
 // http://www.catch22.net/software/winspy
 // Copyright (c) 2002 by J Brown
 //
- 
+
 //
 //	Copied from uxtheme.h
 //  If you have this new header, then delete these and
@@ -64,7 +64,7 @@
 #define ETDT_USETABTEXTURE  0x00000004
 #define ETDT_ENABLETAB      (ETDT_ENABLE  | ETDT_USETABTEXTURE)
 
-// 
+//
 typedef HRESULT (WINAPI * ETDTProc) (HWND, DWORD);
 
 //
@@ -79,7 +79,7 @@
 
     if(hUXTheme)
     {
-        fnEnableThemeDialogTexture = 
+        fnEnableThemeDialogTexture =
             (ETDTProc)GetProcAddress(hUXTheme, "EnableThemeDialogTexture");
 
         if(fnEnableThemeDialogTexture)
@@ -311,6 +311,32 @@
         case ID_PROCESS_PAGE_DEBUGCHANNELS:
             ProcessPage_OnDebugChannels();
             break;
+
+        case ID_POWER_SAVING:
+            ShutDown_PowerSaving();
+            break;
+        case ID_HIBERNATION:
+            ShutDown_Hibernation();
+            break;
+        case ID_SHUTDOWN:
+            ShutDown_PowerOff();
+            break;
+        case ID_RESTART:
+            ShutDown_Restart();
+            break;
+        case ID_LOGOFF_USER:
+            ExitWindowsEx(EWX_LOGOFF, EWX_FORCEIFHUNG);
+            break;
+        case ID_SWITCH_USER:
+            ShutDown_SwitchUser();
+            break;
+        case ID_DISCONNECT:
+            ShutDown_Disconnect();
+            break;
+        case ID_EJECT_COMPUTER:
+            ShutDown_Eject_Computer();
+            break;
+
         case ID_HELP_ABOUT:
             OnAbout();
             break;
@@ -567,7 +593,7 @@
     memset(&item, 0, sizeof(TCITEM));
     item.mask = TCIF_TEXT;
     item.pszText = szTemp;
-    (void)TabCtrl_InsertItem(hTabWnd, 0, &item);
+    (void)TabCtrl_InsertItem(hTabWnd, 0, &item); // tab number
     LoadStringW(hInst, IDS_TAB_PROCESSES, szTemp, 256);
     memset(&item, 0, sizeof(TCITEM));
     item.mask = TCIF_TEXT;
@@ -927,7 +953,7 @@
     hMenu = GetMenu(hMainWnd);
     hViewMenu = GetSubMenu(hMenu, 2);
     hOptionsMenu = GetSubMenu(hMenu, 1);
-    TaskManagerSettings.ActiveTabPage = TabCtrl_GetCurSel(hTabWnd);
+    TaskManagerSettings.ActiveTabPage = TabCtrl_GetCurSel(hTabWnd); // !!! try comment this line of code !!!
     for (i = GetMenuItemCount(hViewMenu) - 1; i > 2; i--) {
         hSubMenu = GetSubMenu(hViewMenu, i);
         if (hSubMenu)
@@ -951,7 +977,7 @@
         LoadStringW(hInst, IDS_MENU_DETAILS, szTemp, 256);
         AppendMenuW(hViewMenu, MF_STRING, ID_VIEW_DETAILS, szTemp);
 
-        if (GetMenuItemCount(hMenu) <= 4) {
+        if (GetMenuItemCount(hMenu) <= 4) { // maybe 5 ?
             hSubMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_WINDOWSMENU));
 
             LoadStringW(hInst, IDS_MENU_WINDOWS, szTemp, 256);
@@ -961,9 +987,7 @@
         }
         CheckMenuRadioItem(hViewMenu, ID_VIEW_LARGE, ID_VIEW_DETAILS, TaskManagerSettings.ViewMode, MF_BYCOMMAND);
 
-        /*
-         * Give the application list control focus
-         */
+        /* Give the application list control focus */
         SetFocus(hApplicationPageListCtrl);
         break;
 
@@ -981,14 +1005,12 @@
 
         if (TaskManagerSettings.Show16BitTasks)
             CheckMenuItem(hOptionsMenu, ID_OPTIONS_SHOW16BITTASKS, MF_BYCOMMAND|MF_CHECKED);
-        if (GetMenuItemCount(hMenu) > 4)
+        if (GetMenuItemCount(hMenu) > 4) // maybe 5 ?
         {
             DeleteMenu(hMenu, 3, MF_BYPOSITION);
             DrawMenuBar(hMainWnd);
         }
-        /*
-         * Give the process list control focus
-         */
+        /* Give the process list control focus */
         SetFocus(hProcessPageListCtrl);
         break;
 
@@ -997,7 +1019,7 @@
         ShowWindow(hProcessPage, SW_HIDE);
         ShowWindow(hPerformancePage, SW_SHOW);
         BringWindowToTop(hPerformancePage);
-        if (GetMenuItemCount(hMenu) > 4) {
+        if (GetMenuItemCount(hMenu) > 4) { // maybe 5 ?
             DeleteMenu(hMenu, 3, MF_BYPOSITION);
             DrawMenuBar(hMainWnd);
         }
@@ -1032,9 +1054,7 @@
         else
             CheckMenuItem(hViewMenu, ID_VIEW_SHOWKERNELTIMES, MF_BYCOMMAND|MF_UNCHECKED);
 
-        /*
-         * Give the tab control focus
-         */
+        /* Give the tab control focus */
         SetFocus(hTabWnd);
         break;
     }
@@ -1057,7 +1077,7 @@
     if (!dwRet || ( (long)dwSize < (long)dwRet+14)) {
         lpszBuf[0] = L'\0';
     } else {
-        lpszTemp[lstrlenW(lpszTemp)-2] = L'\0';  /*remove cr and newline character */
+        lpszTemp[lstrlenW(lpszTemp)-2] = L'\0';  /* remove cr and newline character */
         wsprintfW(lpszBuf, L"%s (0x%x)", lpszTemp, (int)GetLastError());
     }
     if (lpszTemp) {
