473,385 Members | 1,279 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,385 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 11078
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
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...
10
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...
2
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...
1
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
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...
17
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
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...
3
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...
13
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.