17 lines
764 B
PowerShell
17 lines
764 B
PowerShell
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'
|
|
|
|
# Download the installer
|
|
$INSTALLER = Download-File -URL $URL
|
|
|
|
# Install the app
|
|
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 { Write-Error $_.Exception.Message }
|
|
|
|
# Delete the installer
|
|
Write-Output "Deleting downloaded installer from ""${INSTALLER}"""
|
|
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
|
|
Catch { Write-Error $_.Exception.Message } |