473,322 Members | 1,405 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,322 software developers and data experts.

How to 'restart' application on exit?

mdb
Anyone have a suggestion for how to restart my appliacation when I exit?

I'm not talking about a looping batch file - I need my program to have the
ability to restart or not restart. Also, I can't just use Process.Start
because the program is a single-instance program, and I can't guarantee how
long the shutdown process will take (possibly a few seconds). I suppose I
could pass a parameter to the program in Process.Start to bypass the single
instance check, but I guess I'm looking for a more elegant solution, if it
exists...

-mdb
Jul 21 '05 #1
1 2036
Create a service, and start the exe if the exe isn't running. That way you
can stop the service if you ont want the app to restart.

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP

"mdb" <m_b_r_a_y@c_t_i_u_s_a__d0t__com> wrote in message
news:Xn***************************@207.46.248.16.. .
Anyone have a suggestion for how to restart my appliacation when I exit?

I'm not talking about a looping batch file - I need my program to have the
ability to restart or not restart. Also, I can't just use Process.Start
because the program is a single-instance program, and I can't guarantee how long the shutdown process will take (possibly a few seconds). I suppose I
could pass a parameter to the program in Process.Start to bypass the single instance check, but I guess I'm looking for a more elegant solution, if it
exists...

-mdb

Jul 21 '05 #2

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

Similar topics

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
5
by: Jacek Jurkowski | last post by:
In a FMain of below application I'm throwing an Exception. It's catched by a catch section and application restarts. But in a reastarted application try section doesn't work no longer. Error...
13
by: TrintCSD | last post by:
How can I reset the collections within a foreach to be read as a change from within the foreach loop then restart the foreach after collections has been changed? foreach(string invoice in...
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...
6
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()...
1
by: mdb | last post by:
Anyone have a suggestion for how to restart my appliacation when I exit? I'm not talking about a looping batch file - I need my program to have the ability to restart or not restart. Also, I...
8
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 ??
1
by: Heikki Toivonen | last post by:
Is there any way to restart a Python (GUI) application that would work on Windows, Mac OS X and Linux? I'd like to provide a "restart" button to a dialog that would restart the application to pick...
4
by: =?Utf-8?B?bWFzbWl0aA==?= | last post by:
Can you restart an ASP.NET application in the Application_Start event when an error occurs so the next request for the application will fire the Application_Start event again? This would allow...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.