开发者

Self update application while running in memory

I have a console app that is triggered by a scheduled task. I would like to run this console app permanently in a new thread and anytime a newer ver开发者_如何学Gosion of the console app is placed, it should run the main code. (maybe once the main code is done executing, it should run a monitor thread on the console exe. When the exe is changed, a shell execute could be called to the console app again and the original thread aborted?).


Rewrite your main function to run the actual logic of the code in a separate AppDomain. When an update is ready to be installed, shut down that AppDomain and start another with the new code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜