473,657 Members | 2,576 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1051
Tym
On Thu, 25 May 2006 11:36:16 -0400, cj <cj@nospam.nosp am> 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.somethin g 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.nosp am> 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.nosp am> schreef in bericht
news:uu******** ******@TK2MSFTN GP02.phx.gbl...
Are you supposed to run this from the VB program like you'd launch a dos
program? There's not a system.somethin g 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.nosp am> 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.nosp am> 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.or g/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
4336
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 developers, but is relevant discussion. i'm not OT here unless someone thinks i'm trolling (which i'm not, obviously). then i'll disappear and never show my face again. :P
7
2622
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 not Work' It appears that the type of object returned from the "AllReports" collection is not a report object. =>> I need it to be an object of type report.
18
5365
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. After tracing, we find that it should be caused by "ASP.NET Application Restart" (proved by incremented counter for "Application Restarts" of "ASP.NET 1.1.4322" in "Performance" whenever the timeout happens). From MSDN documentation, we find...
3
3203
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 causes a web-app restart ... ? Also, is a stopping and starting a website in IIS the only way to restart a web-app ? (Of course, iisreset stops and starts all web-apps on the web-server ... but
4
3223
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 can use the reports that have already been created. I have somewhere in the region of 200 reports already created in MS Access and I really don't want to have to create new ones. I have successfully linked to the Access ADP, but would really like to...
6
3795
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() ServiceController.WaitForStatus(ServiceControllerStatus.Stopped) ServiceController.start() but doesn´t works. It seems waitforstatus instruction is the last
8
9310
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
7280
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 RESTART WITH numeric-constant Resets the state of the sequence associated with the identity column. If WITH numeric-constant is not specified, the sequence for the identity column is restarted at the value that was specified, either implicitly or...
1
2633
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 any other changes that restart the application? Will modify a code-behind .cs/.vb which calls a class in the App_Code folder restart the application?
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1953
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1611
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.