From f91f4c4dd124567fd57198b0a7bc89bdc6912cad Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 20 Dec 2022 02:50:11 +0100 Subject: [PATCH 01/12] Readme about Template --- Winget-AutoUpdate/mods/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/mods/README.md b/Winget-AutoUpdate/mods/README.md index 4242b09..79d232d 100644 --- a/Winget-AutoUpdate/mods/README.md +++ b/Winget-AutoUpdate/mods/README.md @@ -1 +1,4 @@ -Pre/During/Post install custom scripts should be placed here +Pre/During/Post install/uninstall custom scripts should be placed here. +A script Template and Commom Functions are included to get you started: + +**AppID**`-preinstall.ps1`, `-upgrade.ps1`, `-install.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1` From 9d9945d05774a1c7468b6cad954320cbca2f0a10 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 20 Dec 2022 02:54:14 +0100 Subject: [PATCH 02/12] Template and Functions done --- Winget-AutoUpdate/mods/_AppID-template.ps1 | 31 +++++ Winget-AutoUpdate/mods/_Common-Functions.ps1 | 117 +++++++++++++++++++ 2 files changed, 148 insertions(+) create mode 100644 Winget-AutoUpdate/mods/_AppID-template.ps1 create mode 100644 Winget-AutoUpdate/mods/_Common-Functions.ps1 diff --git a/Winget-AutoUpdate/mods/_AppID-template.ps1 b/Winget-AutoUpdate/mods/_AppID-template.ps1 new file mode 100644 index 0000000..342397a --- /dev/null +++ b/Winget-AutoUpdate/mods/_AppID-template.ps1 @@ -0,0 +1,31 @@ +<# ARRAYS/VARIABLES #> +#Beginning of Process Name to Stop - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" +$Proc = @("") + +#Beginning of Process Name to Wait for to end - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" +$Wait = @("") + +#Beginning of App Name string to Uninstall - required wildcard (*) after! +$App = "" + +#Beginning of Desktop Link Name to Remove - optional wildcard (*) after, without .lnk, multiple: "lnk1","lnk2" +$Lnk = @("") + +<# FUNCTIONS #> +. $PSScriptRoot\_Common-Functions.ps1 + +<# MAIN #> +if ($Proc) { + Stop-ModsProc $Proc +} +if ($Wait) { + Wait-ModsProc $Wait +} +if ($App) { + Uninstall-ModsApp $App +} +if ($Lnk) { + Remove-ModsLnk $Lnk +} + +<# EXTRAS #> diff --git a/Winget-AutoUpdate/mods/_Common-Functions.ps1 b/Winget-AutoUpdate/mods/_Common-Functions.ps1 new file mode 100644 index 0000000..541f178 --- /dev/null +++ b/Winget-AutoUpdate/mods/_Common-Functions.ps1 @@ -0,0 +1,117 @@ +#Common shared functions for mods handling + +function Stop-ModsProc ($Proc) { + foreach ($process in $Proc) + { + Stop-Process -Name $process -Force -ErrorAction SilentlyContinue | Out-Null + } + Return +} +function Wait-ModsProc ($Wait) { + foreach ($process in $Wait) + { + Get-Process $process -ErrorAction SilentlyContinue | Foreach-Object { $_.WaitForExit() } + } + Return +} +function Uninstall-ModsApp ($App) { + $InstalledSoftware = Get-ChildItem "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall" + foreach ($obj in $InstalledSoftware){ + if ($obj.GetValue('DisplayName') -like $App) { + $UninstallString = $obj.GetValue('UninstallString') + if ($UninstallString -like "MsiExec.exe*") { + $ProductCode = Select-String "{.*}" -inputobject $UninstallString + $ProductCode = $ProductCode.matches.groups[0].value + #MSI x64 Installer + $Exec = Start-Process "C:\Windows\System32\msiexec.exe" -ArgumentList "/x$ProductCode REBOOT=R /qn" -PassThru -Wait + #Stop Hard Reboot (if bad MSI!) + if ($Exec.ExitCode -eq 1641) { + Start-Process "C:\Windows\System32\shutdown.exe" -ArgumentList "/a" + } + } + else { + $QuietUninstallString = $obj.GetValue('QuietUninstallString') + if ($QuietUninstallString) { + $QuietUninstallString = Select-String "(\x22.*\x22) +(.*)" -inputobject $QuietUninstallString + $Command = $QuietUninstallString.matches.groups[1].value + $Parameter = $QuietUninstallString.matches.groups[2].value + #All EXE x64 Installers (already defined silent uninstall) + Start-Process $Command -ArgumentList $Parameter -Wait + } + else { + $NullSoft = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Nullsoft.NSIS" + if ($NullSoft) { + #NSIS x64 Installer + Start-Process $UninstallString -ArgumentList "/S" -Wait + } + else { + $Inno = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Inno Setup" + if ($Inno) { + #Inno x64 Installer + Start-Process $UninstallString -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-" -Wait + } + else { + Write-Host "x64 Uninstaller unknown..." + } + } + } + } + $x64 = $true + break + } + } + if (!$x64) { + $InstalledSoftware = Get-ChildItem "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall" + foreach ($obj in $InstalledSoftware){ + if ($obj.GetValue('DisplayName') -like $App) { + $UninstallString = $obj.GetValue('UninstallString') + if ($UninstallString -like "MsiExec.exe*") { + $ProductCode = Select-String "{.*}" -inputobject $UninstallString + $ProductCode = $ProductCode.matches.groups[0].value + #MSI x86 Installer + $Exec = Start-Process "C:\Windows\System32\msiexec.exe" -ArgumentList "/x$ProductCode REBOOT=R /qn" -PassThru -Wait + #Stop Hard Reboot (if bad MSI!) + if ($Exec.ExitCode -eq 1641) { + Start-Process "C:\Windows\System32\shutdown.exe" -ArgumentList "/a" + } + } + else { + $QuietUninstallString = $obj.GetValue('QuietUninstallString') + if ($QuietUninstallString) { + $QuietUninstallString = Select-String "(\x22.*\x22) +(.*)" -inputobject $QuietUninstallString + $Command = $QuietUninstallString.matches.groups[1].value + $Parameter = $QuietUninstallString.matches.groups[2].value + #All EXE x86 Installers (already defined silent uninstall) + Start-Process $Command -ArgumentList $Parameter -Wait + } + else { + $NullSoft = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Nullsoft.NSIS" + if ($NullSoft) { + #NSIS x86 Installer + Start-Process $UninstallString -ArgumentList "/S" -Wait + } + else { + $Inno = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Inno Setup" + if ($Inno) { + #Inno x86 Installer + Start-Process $UninstallString -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-" -Wait + } + else { + Write-Host "x86 Uninstaller unknown..." + } + } + } + } + break + } + } + } + Return +} +function Remove-ModsLnk ($Lnk) { + foreach ($link in $Lnk) + { + Remove-Item -Path "${env:Public}\Desktop\$link.lnk" -Force -ErrorAction SilentlyContinue | Out-Null + } + Return +} From 6e4b5ec094b8483bacc6c958f1c7265526dc0e9f Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 20 Dec 2022 03:19:46 +0100 Subject: [PATCH 03/12] More info --- Winget-AutoUpdate/mods/README.md | 5 ++++- Winget-AutoUpdate/mods/_AppID-template.ps1 | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Winget-AutoUpdate/mods/README.md b/Winget-AutoUpdate/mods/README.md index 79d232d..b35d4e9 100644 --- a/Winget-AutoUpdate/mods/README.md +++ b/Winget-AutoUpdate/mods/README.md @@ -1,4 +1,7 @@ Pre/During/Post install/uninstall custom scripts should be placed here. -A script Template and Commom Functions are included to get you started: +A script Template and Commom Functions are included to get you started... +Scripts that are considered: **AppID**`-preinstall.ps1`, `-upgrade.ps1`, `-install.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1` + +**AppID**`-override.txt` (the content) will be used as a native **winget --override** parameter when upgrading diff --git a/Winget-AutoUpdate/mods/_AppID-template.ps1 b/Winget-AutoUpdate/mods/_AppID-template.ps1 index 342397a..ab42c76 100644 --- a/Winget-AutoUpdate/mods/_AppID-template.ps1 +++ b/Winget-AutoUpdate/mods/_AppID-template.ps1 @@ -2,10 +2,10 @@ #Beginning of Process Name to Stop - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" $Proc = @("") -#Beginning of Process Name to Wait for to end - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" +#Beginning of Process Name to Wait for to End - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" $Wait = @("") -#Beginning of App Name string to Uninstall - required wildcard (*) after! +#Beginning of App Name string to Silently Uninstall (MSI/NSIS/INNO) - required wildcard (*) after! $App = "" #Beginning of Desktop Link Name to Remove - optional wildcard (*) after, without .lnk, multiple: "lnk1","lnk2" From 4bd55ac5684d0fd227b667087b963d0ca8087861 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 20 Dec 2022 03:36:44 +0100 Subject: [PATCH 04/12] Renamed Functions --- Winget-AutoUpdate/mods/_AppID-template.ps1 | 2 +- .../mods/{_Common-Functions.ps1 => _Mods-Functions.ps1} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename Winget-AutoUpdate/mods/{_Common-Functions.ps1 => _Mods-Functions.ps1} (100%) diff --git a/Winget-AutoUpdate/mods/_AppID-template.ps1 b/Winget-AutoUpdate/mods/_AppID-template.ps1 index ab42c76..1b4b73c 100644 --- a/Winget-AutoUpdate/mods/_AppID-template.ps1 +++ b/Winget-AutoUpdate/mods/_AppID-template.ps1 @@ -12,7 +12,7 @@ $App = "" $Lnk = @("") <# FUNCTIONS #> -. $PSScriptRoot\_Common-Functions.ps1 +. $PSScriptRoot\_Mods-Functions.ps1 <# MAIN #> if ($Proc) { diff --git a/Winget-AutoUpdate/mods/_Common-Functions.ps1 b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 similarity index 100% rename from Winget-AutoUpdate/mods/_Common-Functions.ps1 rename to Winget-AutoUpdate/mods/_Mods-Functions.ps1 From 2524d2721e739e8c5d2d83d98022556df80e9b38 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 20 Dec 2022 03:57:09 +0100 Subject: [PATCH 05/12] Spelling --- Winget-AutoUpdate/mods/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/mods/README.md b/Winget-AutoUpdate/mods/README.md index b35d4e9..b8cb64e 100644 --- a/Winget-AutoUpdate/mods/README.md +++ b/Winget-AutoUpdate/mods/README.md @@ -1,5 +1,5 @@ Pre/During/Post install/uninstall custom scripts should be placed here. -A script Template and Commom Functions are included to get you started... +A script Template and Mods Functions are included to get you started... Scripts that are considered: **AppID**`-preinstall.ps1`, `-upgrade.ps1`, `-install.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1` From be8e5777ff797a9978481db5df85dc66a9b3726d Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 20 Dec 2022 04:25:08 +0100 Subject: [PATCH 06/12] Text --- Winget-AutoUpdate/mods/_AppID-template.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/mods/_AppID-template.ps1 b/Winget-AutoUpdate/mods/_AppID-template.ps1 index 1b4b73c..419789b 100644 --- a/Winget-AutoUpdate/mods/_AppID-template.ps1 +++ b/Winget-AutoUpdate/mods/_AppID-template.ps1 @@ -5,7 +5,7 @@ $Proc = @("") #Beginning of Process Name to Wait for to End - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" $Wait = @("") -#Beginning of App Name string to Silently Uninstall (MSI/NSIS/INNO) - required wildcard (*) after! +#Beginning of App Name string to Silently Uninstall (MSI/NSIS/INNO/EXE with defined silent uninstall) - required wildcard (*) after! $App = "" #Beginning of Desktop Link Name to Remove - optional wildcard (*) after, without .lnk, multiple: "lnk1","lnk2" From 9183ec1cbc54a7c79b1c205fab4823fbeb1cba37 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Wed, 21 Dec 2022 23:56:59 +0100 Subject: [PATCH 07/12] Text --- Winget-AutoUpdate/mods/README.md | 2 +- Winget-AutoUpdate/mods/_AppID-template.ps1 | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Winget-AutoUpdate/mods/README.md b/Winget-AutoUpdate/mods/README.md index b8cb64e..68f8617 100644 --- a/Winget-AutoUpdate/mods/README.md +++ b/Winget-AutoUpdate/mods/README.md @@ -1,5 +1,5 @@ Pre/During/Post install/uninstall custom scripts should be placed here. -A script Template and Mods Functions are included to get you started... +A script Template and Mods Functions are included an example to get you started... Scripts that are considered: **AppID**`-preinstall.ps1`, `-upgrade.ps1`, `-install.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1` diff --git a/Winget-AutoUpdate/mods/_AppID-template.ps1 b/Winget-AutoUpdate/mods/_AppID-template.ps1 index 419789b..db1b47d 100644 --- a/Winget-AutoUpdate/mods/_AppID-template.ps1 +++ b/Winget-AutoUpdate/mods/_AppID-template.ps1 @@ -5,7 +5,8 @@ $Proc = @("") #Beginning of Process Name to Wait for to End - optional wildcard (*) after, without .exe, multiple: "proc1","proc2" $Wait = @("") -#Beginning of App Name string to Silently Uninstall (MSI/NSIS/INNO/EXE with defined silent uninstall) - required wildcard (*) after! +#Beginning of App Name string to Silently Uninstall (MSI/NSIS/INNO/EXE with defined silent uninstall in registry) +#Required wildcard (*) after, search is done with "-like"! $App = "" #Beginning of Desktop Link Name to Remove - optional wildcard (*) after, without .lnk, multiple: "lnk1","lnk2" From 512584fbad9d929a1edbad32ae29b539a1c0a154 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Thu, 22 Dec 2022 02:57:19 +0100 Subject: [PATCH 08/12] spelling --- Winget-AutoUpdate/mods/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/mods/README.md b/Winget-AutoUpdate/mods/README.md index 68f8617..dfecef7 100644 --- a/Winget-AutoUpdate/mods/README.md +++ b/Winget-AutoUpdate/mods/README.md @@ -1,5 +1,5 @@ Pre/During/Post install/uninstall custom scripts should be placed here. -A script Template and Mods Functions are included an example to get you started... +A script Template and Mods Functions are included as example to get you started... Scripts that are considered: **AppID**`-preinstall.ps1`, `-upgrade.ps1`, `-install.ps1`, `-installed.ps1`, `-preuninstall.ps1`, `-uninstall.ps1` or `-uninstalled.ps1` From 78724ae344a670bbfe62c98cc488cd5fb666e61b Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Thu, 22 Dec 2022 03:39:48 +0100 Subject: [PATCH 09/12] If winget can't be found - exit with error + text --- Winget-AutoUpdate/Winget-Upgrade.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Winget-AutoUpdate/Winget-Upgrade.ps1 index e92c77c..678082d 100644 --- a/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -89,7 +89,7 @@ if (Test-Network) { } else { Write-Log "Critical: List doesn't exist, exiting..." "Red" - New-Item "$WorkingDir\logs\list_error.txt" -Force + New-Item "$WorkingDir\logs\list_error.txt" -Value "List doesn't exist!" -Force Exit 1 } } @@ -216,6 +216,11 @@ if (Test-Network) { Write-Log "User context execution not installed" } } + else { + Write-Log "Critical: An error occured, exiting..." "red" + New-Item "$WorkingDir\logs\winget_error.txt" -Value "Winget not installed or detected!" -Force + Exit 1 + } } #End From dd9930e3d9a2b91cab93f8c122fc64d7e0f41d70 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Thu, 22 Dec 2022 04:29:03 +0100 Subject: [PATCH 10/12] Forgotten ARM64 fix --- Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 index 9d09782..8c79824 100644 --- a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 +++ b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 @@ -6,7 +6,7 @@ function Invoke-PostUpdateActions { Write-Log "Running Post Update actions..." "yellow" #Reset Winget Sources - $ResolveWingetPath = Resolve-Path "$env:programfiles\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') } + $ResolveWingetPath = Resolve-Path "$env:programfiles\WindowsApps\Microsoft.DesktopAppInstaller_*_*__8wekyb3d8bbwe\winget.exe" | Sort-Object { [version]($_.Path -replace '^[^\d]+_((\d+\.)*\d+)_.*', '$1') } if ($ResolveWingetPath) { #If multiple version, pick last one $WingetPath = $ResolveWingetPath[-1].Path From d6a7c99b6c42d714c85f349d546264d39d1d3070 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Thu, 22 Dec 2022 22:26:34 +0100 Subject: [PATCH 11/12] Now only "error.txt" --- Winget-AutoUpdate/User-Run.ps1 | 2 +- Winget-AutoUpdate/Winget-Upgrade.ps1 | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Winget-AutoUpdate/User-Run.ps1 b/Winget-AutoUpdate/User-Run.ps1 index 0c79cfe..8928583 100644 --- a/Winget-AutoUpdate/User-Run.ps1 +++ b/Winget-AutoUpdate/User-Run.ps1 @@ -83,7 +83,7 @@ else { } #Test if there was a list_/winget_error - if (Test-Path "$WorkingDir\logs\*_error.txt") { + if (Test-Path "$WorkingDir\logs\error.txt") { $MessageType = "error" } else { diff --git a/Winget-AutoUpdate/Winget-Upgrade.ps1 b/Winget-AutoUpdate/Winget-Upgrade.ps1 index 678082d..be9b4c1 100644 --- a/Winget-AutoUpdate/Winget-Upgrade.ps1 +++ b/Winget-AutoUpdate/Winget-Upgrade.ps1 @@ -72,8 +72,8 @@ if (Test-Network) { } #Delete previous list_/winget_error (if they exist) if System - if (Test-Path "$WorkingDir\logs\*_error.txt") { - Remove-Item "$WorkingDir\logs\*_error.txt" -Force + if (Test-Path "$WorkingDir\logs\error.txt") { + Remove-Item "$WorkingDir\logs\error.txt" -Force } #Get External ListPath if System @@ -89,7 +89,7 @@ if (Test-Network) { } else { Write-Log "Critical: List doesn't exist, exiting..." "Red" - New-Item "$WorkingDir\logs\list_error.txt" -Value "List doesn't exist!" -Force + New-Item "$WorkingDir\logs\error.txt" -Value "List doesn't exist!" -Force Exit 1 } } @@ -135,7 +135,7 @@ if (Test-Network) { if ($outdated -like "Problem:*") { Write-Log "Critical: An error occured, exiting..." "red" Write-Log "$outdated" "red" - New-Item "$WorkingDir\logs\winget_error.txt" -Value "$outdated" -Force + New-Item "$WorkingDir\logs\error.txt" -Value "$outdated" -Force Exit 1 } @@ -218,7 +218,7 @@ if (Test-Network) { } else { Write-Log "Critical: An error occured, exiting..." "red" - New-Item "$WorkingDir\logs\winget_error.txt" -Value "Winget not installed or detected!" -Force + New-Item "$WorkingDir\logs\error.txt" -Value "Winget not installed or detected!" -Force Exit 1 } } From 83a65264c02a45f8e2e221a51dcc98f4788252b9 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Fri, 23 Dec 2022 01:17:41 +0100 Subject: [PATCH 12/12] Now, just Nullsoft... --- Winget-AutoUpdate/mods/_Mods-Functions.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Winget-AutoUpdate/mods/_Mods-Functions.ps1 b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 index 541f178..4c97cf7 100644 --- a/Winget-AutoUpdate/mods/_Mods-Functions.ps1 +++ b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 @@ -39,7 +39,7 @@ function Uninstall-ModsApp ($App) { Start-Process $Command -ArgumentList $Parameter -Wait } else { - $NullSoft = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Nullsoft.NSIS" + $NullSoft = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Nullsoft" if ($NullSoft) { #NSIS x64 Installer Start-Process $UninstallString -ArgumentList "/S" -Wait @@ -85,7 +85,7 @@ function Uninstall-ModsApp ($App) { Start-Process $Command -ArgumentList $Parameter -Wait } else { - $NullSoft = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Nullsoft.NSIS" + $NullSoft = Select-String -Path $UninstallString.Trim([char]0x0022) -Pattern "Nullsoft" if ($NullSoft) { #NSIS x86 Installer Start-Process $UninstallString -ArgumentList "/S" -Wait