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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top