G4C RESTART
xOnload
local mode/path/temp
mode = $avanti.app_restart
path = $avanti.app_path
say 'restart = $avanti.av_restart'
guiclose avanti
if $mode = 1
	launch INISET '$path/avanti.ini'
	stop
endif
if $mode = 2
	copy '$path/avsystem/backup/avanti.ini' '$path' SILENT/NOERROR/YESTOALL
	copy '$path/avsystem/backup/formats.dat' '$$this.path' SILENT/NOERROR/YESTOALL
	copy '$path/avsystem/backup/codecs.dat' '$$this.path' SILENT/NOERROR/YESTOALL
endif
pumpmessages
guiopen avanti
pumpmessages
guiquit #this

xOnReturn INISET
guiopen avanti
pumpmessages
guiquit #this


