major update to override Write-Output func
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
If ( Test-Path "${Env:ProgramFiles}\simpleinout-desktop\Simple In Out.exe" ) { LogMsg "Simple In/Out is already installed." ; Exit }
|
||||
If ( Test-Path "${Env:ProgramFiles}\simpleinout-desktop\Simple In Out.exe" ) { Write-Output "Simple In/Out is already installed." ; Exit }
|
||||
|
||||
# Specify the URL to download the app from
|
||||
$URL = 'https://downloads.simpleinout.com/desktop/Simple-In-Out.msi'
|
||||
@@ -7,11 +7,11 @@ $URL = 'https://downloads.simpleinout.com/desktop/Simple-In-Out.msi'
|
||||
$INSTALLER = Download-File -URL $URL
|
||||
|
||||
# Install the app
|
||||
LogMsg "Installing latest version of Simple In/Out from ""${INSTALLER}"""
|
||||
Write-Output "Installing latest version of Simple In/Out from ""${INSTALLER}"""
|
||||
Try { Start-Process "msiexec.exe" -ArgumentList "/i ${INSTALLER} /qn /norestart ALLUSERS=1" -Wait }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
|
||||
# Delete the installer
|
||||
LogMsg "Deleting downloaded installer from ""${INSTALLER}"""
|
||||
Write-Output "Deleting downloaded installer from ""${INSTALLER}"""
|
||||
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
|
||||
Catch { LogErr $_.Exception.Message }
|
||||
Reference in New Issue
Block a user