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 178995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T14:19:44+00:00 2026-05-11T14:19:44+00:00

I am writing the update system for my application and I need to shutdown

  • 0

I am writing the update system for my application and I need to shutdown the application to overwrite the exe but after it shuts down I need to run the update executable, how can I do this?

  • 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. 2026-05-11T14:19:44+00:00Added an answer on May 11, 2026 at 2:19 pm

    Could you just start the updater using Process.Start and have it wait until your main program closes? I think that would be the easiest solution.

    Or you could have a separate launcher program that will check for updates and update before launching the main application. But this leads to the same problem if you have to update the launcher.


    Along the lines of this:

    static void Main(string[] args) {   var haveToUpdate = ...;   if (haveToUpdate)   {     Process.Start('update.exe');     Environment.Exit(0);   } }  static void Main(string[] args) {   var processes = Process.GetProcessesByName('program.exe');    if (processes.Length > 1)     throw new Exception('More than one program.exe running');   else if (processes.Length == 0)     Update();   else     processes[0].Exited += new EventHandler(Program_Exited); }  static void Program_Exited(object sender, EventArgs e) {   Update(); }  static void Update() {   // ... } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a C# application that will update the fields in a SQL
I'm writing an application that utilizes JavaScript timeouts and intervals to update the page.
I'm implementing a simple update mechanism for an application I'm writing the last part
I'm writing an application which requires a status bar update for while a database
I'm writing a test WinForms / C# / .NET 3.5 application for the system
i am writing a simple multicast application. i intend to run it on localhost.
I am writing a content management system where the user can create multiple sites
I am developing an application where I need to update some info every time
I'm writing an application that displays posts, much like a simple forum system. Posts
TL;DR Summary: I need a single command-line application which I can use to get

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.