Created
September 20, 2024 10:09
-
-
Save fluggelgleckheimlen/13db80b9df8f060c4b6c67656614c9e0 to your computer and use it in GitHub Desktop.
Проверяет обновления VK Teams, при загрузке должны быть проверки, но мне лень их писать и пока работает без сбоев
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$VK = Invoke-WebRequest -Method Head -Uri https://vkteams-www.hb.bizmrg.com/win/x32/vkteamssetup.exe | |
$lastmod = $VK.Headers.'Last-Modified' | |
$lastdate = Get-Content -Path .\lastmodified.txt | |
$chatid = "@mychatid" | |
if ($lastmod -like $lastdate) { | |
$oldver = (Get-Item ".\vkteamssetup.exe").VersionInfo.FileVersion | |
$text = "Нет новых версий после $oldver." | |
echo $text | |
#.\Telegram.ps1 -chat_id $chatid -text $text -markdown -nopreview | |
} else { | |
Invoke-WebRequest -Method Get -Uri https://vkteams-www.hb.bizmrg.com/win/x32/vkteamssetup.exe -OutFile ".\vkteamssetup.exe" | |
$newver = (Get-Item ".\vkteamssetup.exe").VersionInfo.FileVersion | |
$text = "VK Teams обновился до версии $newver." | |
.\Telegram.ps1 -chat_id $chatid -text $text -markdown -nopreview | |
If (!$error) {$lastmod > lastmodified.txt} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Установка через BigFix (у каждой версии есть фиксированный урл):
Relevance: