Home All Groups Group Topic Archive Search About

Automating restart of PC

Author
25 May 2006 3:36 PM
cj
I'm using VB2003 running on Windows 2000 5.00.2195 Service Pack 4 and
Windows XP Pro Version 2002 Service Pack 2 PCs.

I understand the Windows API offers a way for the program to reboot the
pc w/o asking me any questions.  Just shut it down and restart it.  Can
someone tell me how to do this?  Thanks.

Author
25 May 2006 3:43 PM
Tym
On Thu, 25 May 2006 11:36:16 -0400, cj <cj@nospam.nospam> wrote:

>I understand the Windows API offers a way for the program to reboot the
>pc w/o asking me any questions.  Just shut it down and restart it.  Can
>someone tell me how to do this?  Thanks.


shutdown /? will help you

Tym

~There's no place like 127.0.0.1~
Author
25 May 2006 4:06 PM
cj
Are you supposed to run this from the VB program like you'd launch a dos
program?  There's not a system.something to do this?  Don't get me wrong
if it works it's ok with me.  I'll look into it.

Tym wrote:
Show quoteHide quote
> On Thu, 25 May 2006 11:36:16 -0400, cj <cj@nospam.nospam> wrote:
>
>> I understand the Windows API offers a way for the program to reboot the
>> pc w/o asking me any questions.  Just shut it down and restart it.  Can
>> someone tell me how to do this?  Thanks.
>
>
> shutdown /? will help you
>
> Tym
>
> ~There's no place like 127.0.0.1~
Author
25 May 2006 6:06 PM
Michel Posseth [MCP]
Process.Start("shutdown", "-r")



regards



Michel Posseth



Show quoteHide quote
"cj" <cj@nospam.nospam> schreef in bericht
news:uudr3UBgGHA.4892@TK2MSFTNGP02.phx.gbl...
> Are you supposed to run this from the VB program like you'd launch a dos
> program?  There's not a system.something to do this?  Don't get me wrong
> if it works it's ok with me.  I'll look into it.
>
> Tym wrote:
>> On Thu, 25 May 2006 11:36:16 -0400, cj <cj@nospam.nospam> wrote:
>>
>>> I understand the Windows API offers a way for the program to reboot the
>>> pc w/o asking me any questions.  Just shut it down and restart it.  Can
>>> someone tell me how to do this?  Thanks.
>>
>>
>> shutdown /? will help you
>>
>> Tym
>>
>> ~There's no place like 127.0.0.1~
Author
25 May 2006 10:18 PM
Herfried K. Wagner [MVP]
"cj" <cj@nospam.nospam> schrieb:
> I understand the Windows API offers a way for the program to reboot the
> pc w/o asking me any questions.  Just shut it down and restart it.  Can
> someone tell me how to do this?

<URL:http://www.mentalis.org/soft/class.qpx?id=7>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>