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

; Installer.
$executable = 'ISTool 5.1.8.exe'
; Default group folder in startmenu.
$group = 'Compilers'
; Installation folder in Program Files.
$directory = 'ISTool'
; Components to install.
$components = ''
; Specify language.
$language = 'english'

; Fix the missing ini file bug?
;~ If Not FileExists(@UserProfileDir & '\Local Settings\Application Data\ISTool\ISTool.ini') Then
;~  DirCreate(@UserProfileDir & '\Local Settings\Application Data\ISTool')
;~  FileWrite(@UserProfileDir & '\Local Settings\Application Data\ISTool\ISTool.ini', '')
;~ EndIf

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

; Remove shortcuts.
If _Programs('ISTool.lnk') Then
    FileChangeDir($group)
    FileDelete('Download DLL Documentation.lnk')
    FileDelete('ISTool Help.lnk')
    FileDelete('ISTool History.lnk')
    FileDelete('ISTool License.lnk')
    FileDelete('Uninstall ISTool.lnk')
EndIf

Exit
#endregion