423,485 Members | 1,664 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,485 IT Pros & Developers. It's quick & easy.

Make Program Restart

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




Nov 21 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.