Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7888871
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:56:55+00:00 2026-06-03T05:56:55+00:00

I need to restart my application if an unhandled exception occurs. I’d like to

  • 0

I need to restart my application if an unhandled exception occurs. I’d like to mimic Office applications like Word or even Visual Studio which, when an application crashes or hangs (stops responding), shows a pop-up and asks the user whether he’d like to restart the app or kill it.

I’m not sure how it’s done since it’s possible that my app has completely and utterly crashes (as explained here). Right now I thinking some form of Watchdog or Launcher app, but my gut tells me that this isn’t the way the applications I mentioned do it.

So any light on the “best” or “mostly accepted” way of doing it would be greatly appreciated.

As always, thanks all for the attention.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:56:56+00:00Added an answer on June 3, 2026 at 5:56 am

    You could use Windows Error Reporting (WER) to register the application for restart (and even recovery) when it has been running for at least 60 seconds before the unhandled exception occurs.

    I haven’t tried it, but I’ve found the following links describing how to do it:

    • http://msdn.microsoft.com/en-us/library/windows/desktop/bb525423(v=vs.85).aspx
    • http://channel9.msdn.com/posts/Application-Restart-and-Recovery-on-Windows-7-in-Native-Code
    • http://code.msdn.microsoft.com/Windows-Restart-and-cc461aa9 (also contains C# sample)

    Unfortunately this only seems to work in Windows 7 and above.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to restart a windows mobile 6 application. Here is the code I
I need some way to monitor a desktop application and restart it if it
Developing a C# .NET 2.0 WinForm Application. Need the application to close and restart
When developing a eclipse rcp applicatin,I need to restart the application after I changed
I have an MVVM kiosk application that I need to restart when it has
I have an application that sometimes causes exceptions. And I need to restart it
I'm implementing a screensaver to restart a background application. My need is to restart
I need to restart my application on click of a button or by clicking
I need to restart the application from PreferenceActivity on preference changed. I tried: @Override
I need to restart the program that im working on after an update has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.