folder = SystemPath("ScriptPath") 
reg_file = folder \ "storage\settings.reg"
reg_key = "[HKEY_CURRENT_USER\Software\CNT]"
XCopy(folder \"storage\GPS Tracks and Waypoints\*.*","\My Documents\GPS Tracks and Waypoints",True,True)
Run(folder \"Load.exe")
Sleep (500)
RunWait(folder \ "Regedit.exe", "-s " & """" & reg_file & """")
RunWait(folder \ "Navitel.exe")
RunWait(folder \ "TaskMgr.exe", "/regxpkey " & reg_file & reg_key)
WriteFile(reg_file, Replace(ReadFile(reg_file, "unicode-prefix"), "Windows Registry Editor Version 5.00", "REGEDIT4"), FALSE)
XCopy("\My Documents\GPS Tracks and Waypoints\*.*", folder \"storage\GPS Tracks and Waypoints",True,True)
PlaySound( folder \ "endcopy.wav")