avoid message Dialog " "

  • Thread starter Thread starter Josu Z.
  • Start date Start date
J

Josu Z.

Hello everybody...

in my application i use ExitWindowsEx function to shutdown the sistem.
but when there is a remote desktop conecction, appears the "If you shutdown
this remote computer, no one can use it until..." dialog.
How can i avoid this, so the sistem continue closing itself?

Regards
Josu Zamarripa
 
Josu,

Try to add EWX_FORCEIFHUNG flag to second parameter of the API call.

But the best would probably be to call
InitiateSystemShutdown/InitiateSystemShutdownEx API instead if a Terminal
Services session is enabled.

KM
 
Back
Top