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

; Installer.
$executable = 'DVDShrink 3.2.exe'
; Default group folder in startmenu.
$group = 'Audio-Video'
; Installation folder in Program Files.
$directory = 'DVD Shrink'
; Components to install.
$components = ''
; Specify language.
$language = ''

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

; Remove shortcuts.
If _Programs('DVD Shrink 3.2.lnk') Then
    FileChangeDir($group)
    FileMove('DVD Shrink 3.2.lnk', 'DVD Shrink.lnk', 1)
    FileDelete('DVD Shrink Information.lnk')
    FileDelete('Uninstall DVD Shrink.lnk')
EndIf
_Desktop('DVD Shrink 3.2.lnk')

; Add RipIt4Me
$source = @ScriptDir & '\Files\DVDShrink\RipIt4Me.exe'
$destination = @ProgramFilesDir & '\' & $directory & '\RipIt4Me.exe'
If FileExists($source) Then
    If FileCopy($source, $destination, 1) Then
        FileCreateShortcut($destination, @ProgramsCommonDir & '\' & $group & '\RipIt4Me.lnk')
    EndIf
EndIf

Exit
#endregion