From 247fd1f4958c85dad747b31f6b921f346e27d300 Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Sat, 9 Apr 2022 11:03:11 +0200 Subject: [PATCH] removed "-silent" from install.bat --- Winget-AutoUpdate-Install.ps1 | 8 ++++---- install.bat | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Winget-AutoUpdate-Install.ps1 b/Winget-AutoUpdate-Install.ps1 index 5eecaf1..328539e 100644 --- a/Winget-AutoUpdate-Install.ps1 +++ b/Winget-AutoUpdate-Install.ps1 @@ -61,7 +61,7 @@ function Install-Prerequisites{ #Ask for installation $MsgBoxTitle = "Winget Prerequisites" $MsgBoxContent = "Microsoft Visual C++ 2015-2019 is required. Would you like to install it?" - $MsgBoxTimeOut = 20 + $MsgBoxTimeOut = 60 $MsgBoxReturn = (New-Object -ComObject "Wscript.Shell").Popup($MsgBoxContent,$MsgBoxTimeOut,$MsgBoxTitle,4+32) if ($MsgBoxReturn -ne 7) { $InstallApp = 1 @@ -137,7 +137,7 @@ function Install-WingetAutoUpdate{ # Set up the task, and register it $task = New-ScheduledTask -Action $taskAction -Principal $taskUserPrincipal -Settings $taskSettings -Trigger $taskTrigger2,$taskTrigger1 - Register-ScheduledTask -TaskName 'Winget-AutoUpdate' -InputObject $task -Force + Register-ScheduledTask -TaskName 'Winget-AutoUpdate' -InputObject $task -Force | Out-Null # Settings for the scheduled task for Notifications $taskAction = New-ScheduledTaskAction –Execute "wscript.exe" -Argument "`"$($WingetUpdatePath)\Invisible.vbs`" `"powershell.exe -NoProfile -ExecutionPolicy Bypass -File `"`"`"$($WingetUpdatePath)\winget-notify.ps1`"`"" @@ -146,7 +146,7 @@ function Install-WingetAutoUpdate{ # Set up the task, and register it $task = New-ScheduledTask -Action $taskAction -Principal $taskUserPrincipal -Settings $taskSettings - Register-ScheduledTask -TaskName 'Winget-AutoUpdate-Notify' -InputObject $task -Force + Register-ScheduledTask -TaskName 'Winget-AutoUpdate-Notify' -InputObject $task -Force | Out-Null # Install config file [xml]$ConfigXML = @" @@ -205,7 +205,7 @@ function Start-WingetAutoUpdate{ else{ $MsgBoxTitle = "Winget-AutoUpdate" $MsgBoxContent = "Would you like to run Winget-AutoUpdate now?" - $MsgBoxTimeOut = 20 + $MsgBoxTimeOut = 60 $MsgBoxReturn = (New-Object -ComObject "Wscript.Shell").Popup($MsgBoxContent,$MsgBoxTimeOut,$MsgBoxTitle,4+32) if ($MsgBoxReturn -ne 7) { $RunWinget = 1 diff --git a/install.bat b/install.bat index 6b58eab..1989d70 100644 --- a/install.bat +++ b/install.bat @@ -1,2 +1,2 @@ @echo off -powershell -Command "Get-ChildItem -Path '%~dp0' -Recurse | Unblock-File; Start-Process powershell.exe -Argument '-executionpolicy bypass -file """%~dp0Winget-AutoUpdate-Install.ps1"" -Silent'" -Verb RunAs +powershell -Command "Get-ChildItem -Path '%~dp0' -Recurse | Unblock-File; Start-Process powershell.exe -Argument '-executionpolicy bypass -file """%~dp0Winget-AutoUpdate-Install.ps1"" '" -Verb RunAs