Hi all,
for automatic update of my WPF application, I've this strategy :
- (1) process.exe starts
- process.exe looks for update => there's an update
- process.exe makes a copy of itself => process_copy.exe
- process.exe launch process_copy.exe with "update" parameters
- process.exe exits
- (2) process_copy.exe starts
- process_copy.exe see the "update" parameters, download update to process.exe
- process_copy.exe launch process.exe
- process_copy.exe exits
- process.exe starts
Note that my application use a dll.
this strategy is working, except some times (not everytime) when the application is launched at startup in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Sometimes it crashes at (2), with a
System.IO.FileNotFoundException was unhandled Message="Could not load file or assembly 'ManagedWinapi, Version=0.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
I don't understand why it can crash. If it can start in (1), why can't it (sometimes) start in (2) ?
Do someone have an explanation ?
Thanks in advance for your answer