How to check if restart is required after Prepare?

107 views
Skip to first unread message

zam...@gmail.com

unread,
Mar 20, 2013, 5:06:35 PM3/20/13
to nappu...@googlegroups.com
After doing Prepare() is there a way to check if restart is required *before* attempting to ApplyUpdates()?

Itamar Syn-Hershko

unread,
Mar 20, 2013, 6:22:48 PM3/20/13
to nappu...@googlegroups.com
Not currently, no, although this should be easy to add

However, not that even if you get "false", ApplyUpdates() may still require a restart - for example if FileUpdateTask fails it will mark itself as requiring a cold update


On Wed, Mar 20, 2013 at 11:06 PM, <zam...@gmail.com> wrote:
After doing Prepare() is there a way to check if restart is required *before* attempting to ApplyUpdates()?

--
You received this message because you are subscribed to the Google Groups "NAppUpdate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nappupdate+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

zam...@gmail.com

unread,
Mar 20, 2013, 7:03:14 PM3/20/13
to nappu...@googlegroups.com
Yes I am experiencing this right now....

In case of Windows Service or batch console app, I don't want to restart so I specify howswap=true.
However, the running app cannot hotswap while running to FileUpdateTask "switches" to cold update, Environment.Exit(0) happens ...

While that is acceptable for console app, it causes errors with Windows Service (which needs to be stopped and then started)....

Itamar Syn-Hershko

unread,
Mar 21, 2013, 4:29:40 AM3/21/13
to nappu...@googlegroups.com
What we can do is define a exit Action, which by default will be Environment.Exit(0), which you can override to provide your own logic. Would that help?
Reply all
Reply to author
Forward
0 new messages