I wrote an auto-update application on C #, a problem arose in the launch of an already updated application.

If you manually start update, everything works fine, but if everything happens automatically, the process does not start, as if the launch command is simply ignored.

It all works like this:

  1. The main application comes the team to update;
  2. The main application starts the update.exe process (or update.bat) and closes;
  3. update downloads the new version and replaces the previous version;
  4. update launches the updated program (here is the problem).

win10 (admin rights), winXP (normal user), everything is done in the appdata root

PS I tried the option with the creation of a batch file, the result is similar, only when manually starting it works, I use System.Diagnostics.Process.Start ()

  • Can you run this file manually after downloading? - VladD
  • Are you sure that when you automatically start, you issue a command to start after the download is complete? - Alexander Muksimov
  • You do not accidentally show the dialog box "this file has been downloaded from the Internet and can be dangerous"? - VladD
  • How exactly do you download the file? - PashaPash
  • Yes, I can, everything works, nothing jumps out, there is no problem with this, it downloads everything via ftp - i4el0vek

1 answer 1

Try specifying in ProcessStartInfo.Verb

startInfo.Verb = "runas"; 
  • Thanks, what you need, now everything works - i4el0vek