#region - Avast4Home install script - (Unknown aka Inno Setup)
#include <Common_Functions.au3>
Opt('TrayIconDebug', 1)
Break(False)

; Installer.
$executable = 'Avast4Home 4.7.1001.exe'
; Default group folder in startmenu.
$group = 'avast! Antivirus'
; Installation folder in Program Files.
$directory = 'Avast4Home'
; Components to install.
$components = ''
; Specify language.
$language = ''

; Upgrade install if already installed
$installed = @ProgramFilesDir & '\' & $directory & '\ashAvast.exe'
$dir_temp = @TempDir & '\AvastInstall'
If FileExists($installed) Then
    FileCopy(@ScriptDir & '\' & $executable, $dir_temp & '\', 9)
    RunWait('"' & $dir_temp & '\' & $executable & '"', $dir_temp)
    DirRemove($dir_temp, 1)
    Exit
EndIf

; Run the installer.
$pid = _InnoSetup()
ProcessWaitClose($pid)

; Remove shortcuts.
If _Programs('avast! Antivirus.lnk') Then
    FileMove($group & '\avast! Antivirus.lnk', 'Internet\', 9)
    DirRemove($group, 1)
EndIf
_Desktop('avast! Antivirus.lnk')

_NeedRestart()

Exit
#endregion