cancelling shut down from a console application

R

robertark

In windows CMD menu, it's "shutdown /a" -- No quotes..

/a means abort the shutdown process (if initiated by shutdown [/r] [/s]
[/t s] [/c])

Hope this helps.
 
R

robertark

In windows CMD menu, it's "shutdown /a" -- No quotes..

/a means abort the shutdown process (if initiated by shutdown [/r] [/s]
[/t s] [/c])

Hope this helps.
 
S

Siam

In windows CMD menu, it's "shutdown /a" -- No quotes..

/a means abort the shutdown process (if initiated by shutdown [/r] [/s]
[/t s] [/c])


This works, provided the shutdown process hasn't already been started.
If the system is already shutting down, any call like the above will
return an error along the lines of "The process failed to initialize
because the system is shutting down".

Siam
 
E

erdem

Yeah,

it does not work because, the shutdown process has been started when I
call the shutdown -a by using ShellExecute.

It gives an error with the code 0xC0000142,

Thanks

Erdem
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top