473,569 Members | 2,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Make Program Restart

Is there a way that anyone knows to force a vb.net program to shut down
and then restart itself?




Nov 21 '05 #1
5 11096
Perhaps one way is to write a windows service which checks for the existance
of the application and if it is not running, starts it, this way you only
have to close your application in order for it to restart.

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:uN******** *****@TK2MSFTNG P11.phx.gbl...
Is there a way that anyone knows to force a vb.net program to shut down
and then restart itself?




Nov 21 '05 #2
Hi,

Use process.start to start a new instance of the program before you
kill the old instance.
Ken
-------------------
"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:uN******** *****@TK2MSFTNG P11.phx.gbl...
Is there a way that anyone knows to force a vb.net program to shut down
and then restart itself?





Nov 21 '05 #3
Ok, I see what you are all saying. This is the problem.

Lets say I have a monitor in a program that downloads an update. It is a
self extracting exe file.

I need to shut down the program, send the update, and then restart the
program.

Has anyone does this before or something close to it?

_______________ _______________ __

From: Ken Tucker [MVP] [mailto:vb***@be llsouth.net]
Sent: Saturday, August 28, 2004 4:11 PM
To: microsoft.publi c.dotnet.langua ges.vb
Subject: Re: Make Program Restart

Hi,

Use process.start to start a new instance of the program before you
kill the old instance.
Ken
-------------------
"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:uN******** *****@TK2MSFTNG P11.phx.gbl...
Is there a way that anyone knows to force a vb.net program to shut down
and then restart itself?
Nov 21 '05 #4
You cant re-start a program from itself. You have to rely on another
process, so I think there are three things you need to do.

Have a service which is running permenently which does the following thing
each cycle.

Check a flag to see if program is to be run
If Yes, run a Bootstrap program

BootStrap
----------
Check for updates, install them if needed
Completes any other action determined by the flag file.
Starts the Main program
Main Program
--------------
Provide options for File | Exit , File | Restart

HTH


--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:e6******** ******@TK2MSFTN GP10.phx.gbl...
Ok, I see what you are all saying. This is the problem.

Lets say I have a monitor in a program that downloads an update. It is a
self extracting exe file.

I need to shut down the program, send the update, and then restart the
program.

Has anyone does this before or something close to it?

_______________ _______________ __

From: Ken Tucker [MVP] [mailto:vb***@be llsouth.net]
Sent: Saturday, August 28, 2004 4:11 PM
To: microsoft.publi c.dotnet.langua ges.vb
Subject: Re: Make Program Restart

Hi,

Use process.start to start a new instance of the program before you
kill the old instance.
Ken
-------------------
"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:uN******** *****@TK2MSFTNG P11.phx.gbl...
Is there a way that anyone knows to force a vb.net program to shut down
and then restart itself?

Nov 21 '05 #5
Hi,

http://msdn.microsoft.com/msdnmag/is...S/default.aspx

Ken
-----------------------
"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:e6******** ******@TK2MSFTN GP10.phx.gbl...
Ok, I see what you are all saying. This is the problem.

Lets say I have a monitor in a program that downloads an update. It is a
self extracting exe file.

I need to shut down the program, send the update, and then restart the
program.

Has anyone does this before or something close to it?

_______________ _______________ __

From: Ken Tucker [MVP] [mailto:vb***@be llsouth.net]
Sent: Saturday, August 28, 2004 4:11 PM
To: microsoft.publi c.dotnet.langua ges.vb
Subject: Re: Make Program Restart

Hi,

Use process.start to start a new instance of the program before you
kill the old instance.
Ken
-------------------
"scorpion53 061" <ad***@nospampl easekjmsolution s.com> wrote in message
news:uN******** *****@TK2MSFTNG P11.phx.gbl...
Is there a way that anyone knows to force a vb.net program to shut down
and then restart itself?

Nov 21 '05 #6

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

Similar topics

2
11098
by: Hal Vaughan | last post by:
My program can, when directed, check a floppy for updates, verify the MD5 sums from another source, then copy the new Java classes to its own directory tree. Once it does this, I'd like to restart the program so the changes take effect. What's the best way to do this? I figure if I call the program's main class, it will run, but then...
10
1415
by: Cam | last post by:
Hi all, The code below is a practical exercise and works well running in the debug environment but fails when being compiled for a release build. I believe this is because the debug environment takes care of memory allocation and the release build relies on code to do this. My research in my books and on the web has not provided any great...
2
1418
by: UJ | last post by:
I've got a program that will do some updates to the system. During that time, if a certain program, called a.exe is running, I want to stop the program, do what I need to do and restart the program. How can I find out if a.exe is currently running and stop it? TIA - UJ.
1
5227
by: aLvInDaHoUsE | last post by:
Hey all, help needed here. I'm trying to restart the program upon clicking on the logout button. How do I recall the main() function in the code? Thanks
0
1481
by: felecha | last post by:
Is there a way to write a Service so that it will fail? I'm working on a Service written in VB.Net, that supports an application we are building, and I want to make sure that it can restart itself. This is my first experience with it. In the Service Control Manager I know there are the options to say what to do if it fails, obviously I...
17
6420
by: UJ | last post by:
Is there any way for a windows service to start a windows program ? I have a service that will need to restart a windows app if it needs to. TIA - Jeff.
6
5909
by: Ian Boyd | last post by:
Every time during development we had to make table changes, we use Control Center. Most of the time, Control Center fails. If you try to "undo all", it doesn't, and you end up losing your identity seed, or your constraints, or your triggers, or your table. Talking to developers at other companies who have had the misfortune of using DB2, they...
3
1676
by: Microsoft | last post by:
Hi I have a c# program that continually runs 24/7 and performs a variety of tasks based on a timer. There is one routine that hangs every Saturday morning without fail. If I restart the program throughout the week is still hangs. I can restart it immediatly after the hang and it runs fine until next Saturday. There is nothing different...
13
5078
kvijayhari
by: kvijayhari | last post by:
hi I'm going to write a program that should be running all the time (24/7) in my server say like a service.. Whenever my server is running this program should be running and whenever i start/restart my machine the program should automatically start and run. The program will be in php. How can i make this to run like a service? So how...
0
7703
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...
0
7619
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7931
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7682
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...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5515
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...
0
5228
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...
1
2119
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
1
1230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.