In latest Visual Studio 2019, there is an App Installer item template to configure it.
You can configure it like below:
The above configuration is best configuration to update silently to latest update as far as possible. Even if there was an update between the background updates every 8 hours, then the app will check update when launching time, and then show confirm dialog for updating.
If you would like to check updates any timing you want, then it can do using Package.CheckUpdateAvailabilityAsync method. After the method is called, when the next launching, if there is an update, then the app will be updated.
In case of setting ShowPrompt option, then progress Window will appear, but confirm dialog will not be displayed. In case of not setting ShowPrompt option, then the app will be updated silently.
For example, if you would like to check updates when users log into Windows, then you can use startup task to call the method. If you don't need any user interface, then you can use following code as startup task.
static async Task Main(string args)
To not see command prompt window, the console app project file's output type is set to WinExe like following: