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

  • Home
  • SEARCH
  • 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 6911011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:53:40+00:00 2026-05-27T08:53:40+00:00

I want to update my exe from remote server. So when the button clicked

  • 0

I want to update my exe from remote server. So when the button clicked on my wpf application it will download the remote and also a remote txt file and replace the current ones in the same folder that exe running. So it will overwrite the current txt and and exe file while my exe is running. How can i achive this ?

Remote host is url like www.mydomain.com/MyAPP.exe

wpf application , c# 4.0

  • 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-27T08:53:41+00:00Added an answer on May 27, 2026 at 8:53 am

    The way that we resolved this issue was to create a shell exe that as the one that was installed and deployed initially to the client machines.

    The “real” executable program is stored in a subdirectory of this initial app. When the shell app is launched, after it has downloaded and installed any updates for the real app, it launches the real app’s executable in a separate AppDomain.

    Here is the core of the “real” app launching from within the shell app:

            System.AppDomainSetup oSetup = new System.AppDomainSetup();
            string sApplicationFile = null;
    
            // Use this to ensure that if the application is running when the user performs the update, that we don't run into file locking issues.
            oSetup.ShadowCopyFiles = "true";
            oSetup.ApplicationName = sAppName;
    
            // Generate the name of the DLL we are going to launch
            sApplicationFile = System.IO.Path.Combine(sApplicationDirectory, sAppName + ".exe");
    
            oSetup.ApplicationBase = sApplicationDirectory;
            oSetup.ConfigurationFile = sApplicationFile + ".config";
            oSetup.LoaderOptimization = LoaderOptimization.MultiDomain;
    
            // Launch the application
            System.AppDomain oAppDomain = AppDomain.CreateDomain(sAppName, AppDomain.CurrentDomain.Evidence, oSetup);
            oAppDomain.SetData("App", sAppName);
            oAppDomain.SetData("User", sUserName);
            oAppDomain.SetData("Pwd", sUserPassword);
    
            oAppDomain.ExecuteAssembly(sApplicationFile);
    
            // When the launched application closes, close this application as well
            Application.Exit();
    

    Note that in our version, the shell app collects the user name and password from the user in order to access the update web site correctly. This data is then passed to the “real” app through the SetData method on the AppDomain.

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

Sidebar

Related Questions

I want to update some file in a server, with an automated script and
I want to update an ASP .NET web application (including web.config file changes and
Im writing an install and update-server for an intranet-application and I want the user
I want Windows Update to automatically download and install updates on my Vista machine,
I want to update a .class file in a jar with a new one.
I am tranfering a file from one server to another using Core FTP mini-sftp-server
from my application I want to open files (jpg, pdf, ..) with the default
I create a .NET (WPF) Application, and compile it to .EXE. Then I create
I want update a column by adding days to current time. In pseudosyntax it
I want to update a list of storage devices as the user inserts USB

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.