Re: Restarting the computer programmatically

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



On Oct 8, 10:08 am, Duggi <DuggiSrinivasa...@xxxxxxxxx> wrote:
On Oct 8, 9:59 am, "K Viltersten" <t...@xxxxxxxxxxxxxx> wrote:





I'd like to believe that there's at least a
convenience wrapper for performing such task
in C#. Is there? Where?

Or else another tweak around is invoke
shutdown.exe in a process, which shuts
system down.

What are drawbacks with this method? Can it
lead to the computer being stuck TRYING to
restart and not being able to kill some of
the processes?

I need something that basically ensures that
"the cord is unplugged".

what is "the cord is unplugged" means??  :-(
(I am not good at English may be)

Try to picture what happens if you UNPLUG your
computer (desktop, not laptop). That's what i
ment to cause. Guaranteed reboot.

As for the phrase - it's probably my english,
not yours, that is to blame, hehe.

--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.- Hide quoted text -

- Show quoted text -

As far as I know, if You wanted a guaranteed reboot, the only approach
is load all the current running processes that are running and start
killing them one after another.

I strongly do not recommend this as the side effects are generally
more than the advantage you gain.

The earlier approach is good enough, as even if some proceses are not
killed, and system system does not shut down, my support guys can
always request the customer to restart the machine carefully. (To the
best fo my knowledge, a process can not be stopped because it has
something important to do. or current user do not have permision to do
so)

If you want code for get all the processes and kill them one after
anthor, I can write send it to you.

-Cnu- Hide quoted text -

- Show quoted text -

Hey be I am wrong, the above as per my best knowledge goes.

-Cnu
.


Quantcast