New things :)
parent
f28ffed5cd
commit
aec7bd2f94
|
@ -55,7 +55,7 @@ if ($Logs) {
|
||||||
#Not available yet
|
#Not available yet
|
||||||
$Message = $NotifLocale.local.outputs.output[5].message
|
$Message = $NotifLocale.local.outputs.output[5].message
|
||||||
$MessageType = "warning"
|
$MessageType = "warning"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise
|
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elseif ($Help) {
|
elseif ($Help) {
|
||||||
|
@ -67,7 +67,7 @@ else {
|
||||||
if (Test-WAUisRunning) {
|
if (Test-WAUisRunning) {
|
||||||
$Message = $NotifLocale.local.outputs.output[8].message
|
$Message = $NotifLocale.local.outputs.output[8].message
|
||||||
$MessageType = "warning"
|
$MessageType = "warning"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
#Run scheduled task
|
#Run scheduled task
|
||||||
|
@ -75,19 +75,19 @@ else {
|
||||||
#Starting check - Send notification
|
#Starting check - Send notification
|
||||||
$Message = $NotifLocale.local.outputs.output[6].message
|
$Message = $NotifLocale.local.outputs.output[6].message
|
||||||
$MessageType = "info"
|
$MessageType = "info"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||||
#Sleep until the task is done
|
#Sleep until the task is done
|
||||||
While (Test-WAUisRunning) {
|
While (Test-WAUisRunning) {
|
||||||
Start-Sleep 3
|
Start-Sleep 3
|
||||||
}
|
}
|
||||||
$Message = $NotifLocale.local.outputs.output[9].message
|
$Message = $NotifLocale.local.outputs.output[9].message
|
||||||
$MessageType = "success"
|
$MessageType = "success"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
#Check failed - Just send notification
|
#Check failed - Just send notification
|
||||||
$Message = $NotifLocale.local.outputs.output[7].message
|
$Message = $NotifLocale.local.outputs.output[7].message
|
||||||
$MessageType = "error"
|
$MessageType = "error"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise
|
Start-NotifTask -Message $Message -MessageType $MessageType
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,12 +55,15 @@ function Test-Network {
|
||||||
|
|
||||||
#Send Warning Notif if no connection for 5 min
|
#Send Warning Notif if no connection for 5 min
|
||||||
if ($timeout -eq 300) {
|
if ($timeout -eq 300) {
|
||||||
|
#Log
|
||||||
Write-Log "Notify 'No connection' sent." "Yellow"
|
Write-Log "Notify 'No connection' sent." "Yellow"
|
||||||
|
|
||||||
|
#Notif
|
||||||
$Title = $NotifLocale.local.outputs.output[0].title
|
$Title = $NotifLocale.local.outputs.output[0].title
|
||||||
$Message = $NotifLocale.local.outputs.output[0].message
|
$Message = $NotifLocale.local.outputs.output[0].message
|
||||||
$MessageType = "warning"
|
$MessageType = "warning"
|
||||||
$Balise = "connection"
|
$Balise = "Connection"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -69,11 +72,14 @@ function Test-Network {
|
||||||
|
|
||||||
#Send Timeout Notif if no connection for 30 min
|
#Send Timeout Notif if no connection for 30 min
|
||||||
Write-Log "Timeout. No internet connection !" "Red"
|
Write-Log "Timeout. No internet connection !" "Red"
|
||||||
|
|
||||||
|
#Notif
|
||||||
$Title = $NotifLocale.local.outputs.output[1].title
|
$Title = $NotifLocale.local.outputs.output[1].title
|
||||||
$Message = $NotifLocale.local.outputs.output[1].message
|
$Message = $NotifLocale.local.outputs.output[1].message
|
||||||
$MessageType = "error"
|
$MessageType = "error"
|
||||||
$Balise = "connection"
|
$Balise = "Connection"
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise
|
||||||
|
|
||||||
return $false
|
return $false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
Function Update-App ($app) {
|
Function Update-App ($app) {
|
||||||
|
|
||||||
#Get App Info
|
#Get App Info
|
||||||
$OnClickAction = Get-AppInfo $app.Id
|
$ReleaseNoteURL = Get-AppInfo $app.Id
|
||||||
|
if ($ReleaseNoteURL){
|
||||||
|
$Button1Text = $NotifLocale.local.outputs.output[10].message
|
||||||
|
}
|
||||||
|
|
||||||
#Send available update notification
|
#Send available update notification
|
||||||
Write-Log "Updating $($app.Name) from $($app.Version) to $($app.AvailableVersion)..." "Cyan"
|
Write-Log "Updating $($app.Name) from $($app.Version) to $($app.AvailableVersion)..." "Cyan"
|
||||||
|
@ -11,7 +14,7 @@ Function Update-App ($app) {
|
||||||
$Message = $NotifLocale.local.outputs.output[2].message -f $($app.Version), $($app.AvailableVersion)
|
$Message = $NotifLocale.local.outputs.output[2].message -f $($app.Version), $($app.AvailableVersion)
|
||||||
$MessageType = "info"
|
$MessageType = "info"
|
||||||
$Balise = $($app.Name)
|
$Balise = $($app.Name)
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise -Button1Action $ReleaseNoteURL -Button1Text $Button1Text
|
||||||
|
|
||||||
#Winget upgrade
|
#Winget upgrade
|
||||||
Write-Log "########## WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID '$($App.Id)' ##########" "Gray"
|
Write-Log "########## WINGET UPGRADE PROCESS STARTS FOR APPLICATION ID '$($App.Id)' ##########" "Gray"
|
||||||
|
@ -84,7 +87,7 @@ Function Update-App ($app) {
|
||||||
$Message = $NotifLocale.local.outputs.output[3].message -f $($app.AvailableVersion)
|
$Message = $NotifLocale.local.outputs.output[3].message -f $($app.AvailableVersion)
|
||||||
$MessageType = "success"
|
$MessageType = "success"
|
||||||
$Balise = $($app.Name)
|
$Balise = $($app.Name)
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise -Button1Action $ReleaseNoteURL -Button1Text $Button1Text
|
||||||
|
|
||||||
$Script:InstallOK += 1
|
$Script:InstallOK += 1
|
||||||
|
|
||||||
|
@ -99,7 +102,7 @@ Function Update-App ($app) {
|
||||||
$Message = $NotifLocale.local.outputs.output[4].message
|
$Message = $NotifLocale.local.outputs.output[4].message
|
||||||
$MessageType = "error"
|
$MessageType = "error"
|
||||||
$Balise = $($app.Name)
|
$Balise = $($app.Name)
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Balise $Balise -Button1Action $ReleaseNoteURL -Button1Text $Button1Text
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,13 @@
|
||||||
function Update-WAU {
|
function Update-WAU {
|
||||||
|
|
||||||
$OnClickAction = "https://github.com/Romanitho/Winget-AutoUpdate/releases"
|
$OnClickAction = "https://github.com/Romanitho/Winget-AutoUpdate/releases"
|
||||||
|
$Button1Text = $NotifLocale.local.outputs.output[10].message
|
||||||
|
|
||||||
#Send available update notification
|
#Send available update notification
|
||||||
$Title = $NotifLocale.local.outputs.output[2].title -f "Winget-AutoUpdate"
|
$Title = $NotifLocale.local.outputs.output[2].title -f "Winget-AutoUpdate"
|
||||||
$Message = $NotifLocale.local.outputs.output[2].message -f $WAUCurrentVersion, $WAUAvailableVersion
|
$Message = $NotifLocale.local.outputs.output[2].message -f $WAUCurrentVersion, $WAUAvailableVersion
|
||||||
$MessageType = "info"
|
$MessageType = "info"
|
||||||
$Balise = "Winget-AutoUpdate"
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Button1Action $OnClickAction -Button1Text $Button1Text
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
|
||||||
|
|
||||||
#Run WAU update
|
#Run WAU update
|
||||||
try {
|
try {
|
||||||
|
@ -53,8 +53,7 @@ function Update-WAU {
|
||||||
$Title = $NotifLocale.local.outputs.output[3].title -f "Winget-AutoUpdate"
|
$Title = $NotifLocale.local.outputs.output[3].title -f "Winget-AutoUpdate"
|
||||||
$Message = $NotifLocale.local.outputs.output[3].message -f $WAUAvailableVersion
|
$Message = $NotifLocale.local.outputs.output[3].message -f $WAUAvailableVersion
|
||||||
$MessageType = "success"
|
$MessageType = "success"
|
||||||
$Balise = "Winget-AutoUpdate"
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Button1Action $OnClickAction -Button1Text $Button1Text
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
|
||||||
|
|
||||||
#Rerun with newer version
|
#Rerun with newer version
|
||||||
Write-Log "Re-run WAU"
|
Write-Log "Re-run WAU"
|
||||||
|
@ -70,8 +69,7 @@ function Update-WAU {
|
||||||
$Title = $NotifLocale.local.outputs.output[4].title -f "Winget-AutoUpdate"
|
$Title = $NotifLocale.local.outputs.output[4].title -f "Winget-AutoUpdate"
|
||||||
$Message = $NotifLocale.local.outputs.output[4].message
|
$Message = $NotifLocale.local.outputs.output[4].message
|
||||||
$MessageType = "error"
|
$MessageType = "error"
|
||||||
$Balise = "Winget-AutoUpdate"
|
Start-NotifTask -Title $Title -Message $Message -MessageType $MessageType -Button1Action $OnClickAction -Button1Text $Button1Text
|
||||||
Start-NotifTask $Title $Message $MessageType $Balise $OnClickAction
|
|
||||||
Write-Log "WAU Update failed" "Red"
|
Write-Log "WAU Update failed" "Red"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
<output id="9">
|
<output id="9">
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Die manuelle suche nach Updates wurde abgeschlossen.</message>
|
<message>Die manuelle suche nach Updates wurde abgeschlossen.</message>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</output>
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manual check for updated apps completed...</message>
|
<message>Manual check for updated apps completed...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manual check for updated apps completed...</message>
|
<message>Manual check for updated apps completed...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manual check for updated apps completed...</message>
|
<message>Manual check for updated apps completed...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Recherche de mises à jour terminée.</message>
|
<message>Recherche de mises à jour terminée.</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>Consulter le journal des modifications</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>A frissített alkalmazások kézi ellenőrzése befejeződött...</message>
|
<message>A frissített alkalmazások kézi ellenőrzése befejeződött...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manual check for updated apps completed...</message>
|
<message>Manual check for updated apps completed...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manual check for updated apps completed...</message>
|
<message>Manual check for updated apps completed...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manual check for updated apps completed...</message>
|
<message>Manual check for updated apps completed...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
|
@ -50,5 +50,9 @@
|
||||||
<!--Manual check for updated apps completed-->
|
<!--Manual check for updated apps completed-->
|
||||||
<message>Manuell koll efter uppdaterade appar slutförd...</message>
|
<message>Manuell koll efter uppdaterade appar slutförd...</message>
|
||||||
</output>
|
</output>
|
||||||
|
<output id="10">
|
||||||
|
<!--See changelog-->
|
||||||
|
<message>See changelog</message>
|
||||||
|
</output>
|
||||||
</outputs>
|
</outputs>
|
||||||
</local>
|
</local>
|
||||||
|
|
Loading…
Reference in New Issue