Hi Erik,
How can I guard here? Checking the exit code doesn't seem to work, since it returns 0 if there is an update and 0 if there isn't. Looking at the source, I can see that the exit code is only set to 1 when there is an error (and you've got some comments in there about putting in real error codes, so I understand this isn't fully fleshed out yet).
wyUpdate returns 0 if there wasn't an update, and it doesn't return at all if there is an update. (That is, it just shows itself to the user). You could detect when the wyUpdate window is visible (a quick & dirty method would to loop for about a second or 2, polling the wyUpdate process to see if the window is visible, then exiting your app if wyUpdate is visible).
Or
We could add another commandline switch to wyUpdate:
wyUpdate.exe -quickcheck -justcheck
Where wyUpdate would return 2 if there's an update available and return 0 if there's no update available. This would allow you to re-run wyUpdate.exe again & exit your app if there's an update available.
Would this work for you?
Or maybe there is a different method?
Unfortunately the only other way to do silent updates is to use the AutomaticUpdater control. And it currently doesn't work with apps without a GUI.