Windows Shutdown Window

Is there a way to open the Windows XP completion dialog (the one that contains three buttons - Suspend, Shutdown, Restart and Hibernate when you press Shift) using any language (preferably: C / C ++, VB, Haskell, batch)?

I think I can load the msgina.dll file into my C ++ program, but I don’t know what to do next - what function in dll is used to display the dialog?

+4
source share
2 answers

Assuming your language has a way to do basic file I / O and call shortcuts in Windows, try this tip from here :

  • Create a new txt file somewhere on your system, open it and enter in this line: (new ActiveXObject("Shell.Application")).ShutdownWindows();
  • Save and close the file. Change the extension to *.js .
  • You can make a shortcut for this file to simplify the work with your system.
+5
source

I find PowerShell more elegant than other Windows scripts.

  (New-Object -Com Shell.Application) .ShutdownWindows ()
+2
source

All Articles