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

; Installer.
$executable = 'Unlocker 1.8.5.exe'
; Default group folder in startmenu.
$group = 'Unlocker'
; Installation folder in Program Files.
$directory = ''

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

; Remove shortcuts.
If _Programs('Uninstall.lnk') Then
    DirRemove($group, 1)
EndIf

RegDelete('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run', 'UnlockerAssistant')

ProcessWait('UnlockerAssistant.exe', 5)
ProcessClose('UnlockerAssistant.exe')
_RefreshSystemTray()

Exit
#endregion