SilentClickOnce
SilentClickOnce copied to clipboard
Why make it a WinForms App?
Thanks for posting this App! It helps us alot. I was just curios as to why you made it as a WinForms App instead of a console App? The obvious reason, is because a WinForms app is easy to hide :) But I did some digging and found easy ways to also make a Console App not be shown. Thanks again!
Some events are not firing using ConsoleApp, I don't know if I have to change something or ConsoleApp just isn't compatible. I have to run some tests but can't find time
Which Events aren't being fired? I will be attempting to make a Console App out of it as well. :) I will let you know what I achieve (or not).
May I just point one thing out? The Date / Time of your WriteLog function can be simplified. It is not necessary to separate the Date and Time Parts into individual Parts in order to format them (like with D2 for example). You can Format them directly in the ToString Function of the DateTime object like this:
Console.WriteLine($"[{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}] {logText}")
Here is a link where you will find all the parameters available for formatting date and time :)
https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
I find it absolutely awesome that you did this in VB. I love VB and hope it never dies!
okay, here is the reason (taken from the Remarks here: https://learn.microsoft.com/es-es/dotnet/api/system.deployment.application.inplacehostingmanager.downloadprogresschanged?view=netframework-4.8.1&viewFallbackFrom=netstandard-1.0
The Events get fired out of order in a console app:
In a console application, events are assigned to threads from a thread pool. Therefore, you might receive progress update events out of order, with a subsequent event showing a decrease compared with a previous event. You will not see such behavior in a Windows Forms-based application, because events in Windows Forms are processed sequentially out of the user interface (UI) thread's message queue.
so, I will leave it as a WinForms App :)