$packageName = 'ChocolateyGUI'
$fileType = 'msi'
$silentArgs = '/quiet'
$scriptPath =  $(Split-Path $MyInvocation.MyCommand.Path)
$fileFullPath = Join-Path $scriptPath 'ChocolateyGUI.msi'

try { 
  Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $fileFullPath
} catch {
  Write-ChocolateyFailure $packageName $($_.Exception.Message)
  throw 
}

$packageName = 'ChocolateyGUI'
$fileType = 'msi'
$silentArgs = '/quiet'
$scriptPath =  $(Split-Path $MyInvocation.MyCommand.Path)
$fileFullPath = Join-Path $scriptPath 'ChocolateyGUI.msi'

Install-ChocolateyInstallPackage $packageName $fileType $silentArgs $fileFullPath
Remove Write-ChocolateyFailure and try/catch which is no longer necessary
Remove Write-ChocolateyFailure and try/catch which is no longer necessary
