471,829 Members | 1,899 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 10963
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

"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:uN*************@TK2MSFTNGP11.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
-------------------
"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:uN*************@TK2MSFTNGP11.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***@bellsouth.net]
Sent: Saturday, August 28, 2004 4:11 PM
To: microsoft.public.dotnet.languages.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
-------------------
"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:uN*************@TK2MSFTNGP11.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

"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:e6**************@TK2MSFTNGP10.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***@bellsouth.net]
Sent: Saturday, August 28, 2004 4:11 PM
To: microsoft.public.dotnet.languages.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
-------------------
"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:uN*************@TK2MSFTNGP11.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
-----------------------
"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:e6**************@TK2MSFTNGP10.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***@bellsouth.net]
Sent: Saturday, August 28, 2004 4:11 PM
To: microsoft.public.dotnet.languages.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
-------------------
"scorpion53061" <ad***@nospampleasekjmsolutions.com> wrote in message
news:uN*************@TK2MSFTNGP11.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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Hal Vaughan | last post: by
2 posts views Thread by UJ | last post: by
1 post views Thread by aLvInDaHoUsE | last post: by
6 posts views Thread by Ian Boyd | last post: by
3 posts views Thread by Microsoft | last post: by
NeoPa
reply views Thread by NeoPa | last post: by
reply views Thread by YellowAndGreen | last post: by
aboka
reply views Thread by aboka | last post: by

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.