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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:51:16+00:00 2026-05-17T14:51:16+00:00

I have a program that spawns another process from within one of the loaded

  • 0

I have a program that spawns another process from within one of the loaded assemblies. This second process goes and grabs an installer for the program that spawned it (confused yet?). This second process just starts the installer at a specific web address:

System.Diagnostics.Process.Start(www.mySite.com/myInstaller.exe);

The problem is that if this installer is run before the parent program’s assemblies have been unloaded it will not install correctly as a couple of the program’s assemblies need to be overwritten as part of the install.

We need this process to be called from our parent program.

My question is how do I spawn this process so that it runs only after the assemblies have unloaded? Is there a better way to do all 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. Editorial Team
    Editorial Team
    2026-05-17T14:51:16+00:00Added an answer on May 17, 2026 at 2:51 pm

    So basically, you have an application that “self-updates”. Your main app calls an updater, which goes and finds the installer and runs that. The installer then runs, and could easily replace the assembly that called the updater, and the updater. When the installer’s done, you restart the application.

    You can (and .NET does by default) use the OS shell to start the new process. This process will have no connection to its parent; if, for instance, you created an executable whose sole purpose was to open Notepad, your executable would call Process.Start(“notepad.exe”), Notepad would open, and your process would close, leaving Notepad open.

    To make sure your application has closed, you can use Process.GetProcesses() in the installer, which will get the list of processes you’d see by using the Task Manager. Scan the list for your application’s executable name (and if applicable, the updater); if it exists, try sleeping for a second, then try again. Still there? Alert the user to manually close the application, then when they say they have, check again.

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

Sidebar

Related Questions

I have a program that reads from a file that grabs 4 bytes from
I have a program that gets a JSON from the server using getJSON and
I'm running gnome and have a program that spawns off a large number of
I have a main application that spawns a seperate thread to process messages off
I have a program that spawns 3 worker threads that do some number crunching,
I have a Python program that spawns many threads, runs 4 at a time,
I have a program that spawns lots of children and runs for long periods
How do I program the scenario where I have an action that spawns two
I have created a program in Actionscript 3 (Flash CS5) that spawns an Egg
I have program that requires Python 3, but I develop Django and it uses

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.