I have found another solution than waiting a week. However, this solution is generally not applicable for normal users. For me as a developer (local admin on my PC), however, it is.
I had accidentally skipped the update. As I said, however, I didn't want to wait a week. Inspired by this StackOverflow answer, I realised that ClickOnce applications save the skipping in the registry. My solution is to manipulate the marker that recognizes that the user has skipped the update.
The relevant ClickOnce info gets stored to this registry location:
Computer\HKEY_CLASSES_ROOT\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0\PackageMetadata\{2ec93463-b0c3-45e1-8364-327e96aea856}_{3f471841-eef2-47d6-89c0-d028f03a4ad5}
Although this path seems quite dynamic/individual with all those GUIDs it's rather static and constant in all cases.
The tricky part is now to find the right subdirectory for your own case. There seem to be two directories for each ClickOnce application. In the directory with the shortest suffix there is a registry entry with the key {2ad613da-6fdb-4671-af9e-18ab2e4df4d8}!UpdateSkipTime
. Yep, the GUID is constant again...
If you skipped the update, the key's value is the timestamp when the skip occured. Now by setting this value to lower value, one can make the update-dialog appear again.
I did this using this powershell script:
$packageMetadataEntry = "HKEY_CLASSES_ROOT\Software\Microsoft\Windows\CurrentVersion\Deployment\SideBySide\2.0\PackageMetadata\{2ec93463-b0c3-45e1-8364-327e96aea856}_{3f471841-eef2-47d6-89c0-d028f03a4ad5}\"
$appEntry = "foo..bar_0000000000000000_d0653325c3f06cf6"
$registryPath = $packageMetadataEntry + $appEntry
$valueName = "{2ad613da-6fdb-4671-af9e-18ab2e4df4d8}!UpdateSkipTime"
$binaryData = [system.Text.Encoding]::Unicode.GetBytes("0001/01/01 00:00:00`0") # has to be terminated with a null byte (`0)
[Microsoft.Win32.Registry]::SetValue($registryPath, $valueName, $binaryData, [Microsoft.Win32.RegistryValueKind]::Binary)
⚠️ Disclaimer:
Better backup that registry entry before any manipulation! 😉