473,394 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Automating restart of PC

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.
May 25 '06 #1
4 1037
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~
May 25 '06 #2
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:
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~

May 25 '06 #3

Process.Start("shutdown", "-r")

regards

Michel Posseth

"cj" <cj@nospam.nospam> schreef in bericht
news:uu**************@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~

May 25 '06 #4
"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/>
May 25 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Charles Banas | last post by:
weird subject - i hope more than just one curious regular will hear me out. :) ok, i've got a bit of a big problem, and i need answers as soon as possible. i know this forum is meant for web...
7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
18
by: amdishigh | last post by:
We are experiencing the following problems concerning ASP.NET: our ASP.NET application, written in .NET 1.1 platform, and hosted in IIS 5.0 environment, experience frequent session timeout problem....
3
by: John A Grandy | last post by:
In ASP.NET 1.1 and/or 2.0 ..... Is it possible to configure a web-app so that replacement of an .xml file ( physically located under the virtual dir root ) with a newer version of the file...
4
by: Supa Hoopsa | last post by:
I am in the process of rewriting an MS Access application (access front end with SQL 2k database) in VB.NET and one of the things I would like to do is link in to the compiled Access ADE so that I...
6
by: Leonardo Curros | last post by:
Hello, I would like to know what's the best way to restart one service. I would like to do it from the service itself. Is this possible? I try it with ServiceController.stop()...
8
by: kenneth fleckenstein nielsen | last post by:
hi guru's I want to restart my webservice when ever it throws an exception that isn't cought. can i do that by web.config or iss or how ??
4
by: shorti | last post by:
Can anyone explain in greater (and more comprehensive) detail what the RESTART option does in the ALTER TABLE table ALTER COLUMN statement. This is the description in Info Center: RESTART or...
1
by: Brian Simmons | last post by:
Hi All, I know that if you modify the web.config file or any file in the App_Code subfolder, that ASP.net 2.0 will "restart" the application (i.e. clear out any sessions, etc...). Are there...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.