InstallDir

ShowMessage Stop Services
StopService WatchDogService
StopService ScadaSystemService
StopService ScadaDiagramService
StopService ScadaFrontHolder
Delay 3000,20

ShowMessage Uninstall Services
DeleteServices WatchDogService,ScadaSystemService,ScadaDiagramService,ScadaFrontHolder
Delay 3000,20

ShowMessage Copy Files
DeleteDir bin
CopyDir bin
Progress 10

ShowMessage Initialize Configuration
CopyDir ServiceData
CopyDir ServiceData\drives,overwrite
CopyFile locations.json
InstallDir
Progress 10

ShowMessage Install Services
InstallService ScadaSystemService
Delay 500,10
InstallService ScadaDiagramService
Delay 500,10
InstallService ScadaFrontHolder
Delay 500,10
InstallService WatchDogService
Delay 3000,20

ShowMessage Start Services
StartService ScadaSystemService
Delay 2000,10
StartService ScadaDiagramService
Delay 2000,10
StartService ScadaFrontHolder
Delay 2000,10
StartService WatchDogService
Delay 2000,10

ShowMessage Update Install State
CreateShortcut
InstallReg
Progress 5