This is the actual code the upgrade wizard uses to upgrade your old 6.1 brain to 6.2. Comments should explain what it does:
'Open new Hal 6.2 script and save to a string changing references from HalBrain.DB to Hal6Upg.db
ff = FreeFile
Open "hal6.uhp" For Input As #ff
OldHalBackup = Input(LOF(ff), ff)
OldHalBackup = Replace(OldHalBackup, "HalBrain.DB", "Hal6Upg.db", 1, -1, vbTextCompare)
Close #ff
'Make a copy of the 6.2 script in a new script file, changing reference of "Ultra Hal 6.2 Default Brain" to "Ultra Hal 6.2 Upgraded Brain"
ff = FreeFile
Open "hal6upg.uhp" For Output As #ff
Print #ff, Replace(OldHalBackup, "Ultra Hal 6.2 Default Brain", "Ultra Hal 6.2 Upgraded Brain", 1, -1, vbTextCompare)
Close #ff
'Destroy backup script
Kill "hal6bak.uhp"
'Make a copy of the old database (that setup.exe made) and name it Hal6Upg.db
FileCopy "Hal6Old.DB", "Hal6Upg.db"
'Open old 6.1 database (OldHal) and new 6.2 database (NewHal)
Set OldHal = CreateObject("UltraHalAsst6.Brain")
Set NewHal = CreateObject("UltraHalAsst6.Brain")
OldHal.OpenDatabase "Hal6Upg.DB"
NewHal.OpenDatabase "HalBrain.db"
'The following tables get copied from the New 6.2 brain to the old 6.1 brain
'If a table doesn't exist, it is created. If a table already exists, it is dropped
'and recreated
UpgradeTable "UnitConversion", "TopicSearch", "miscData", OldHal, NewHal
UpgradeTable "UnitConversionDetect", "PatternMatch", "miscData", OldHal, NewHal
UpgradeTable "AdjNoun", "TopicSearch", "miscData", OldHal, NewHal
UpgradeTable "TimeZones", "TopicSearch", "miscData", OldHal, NewHal
UpgradeTable "VerbPrepNoun", "TopicSearch", "miscData", OldHal, NewHal
UpgradeTable "miscPhrases", "TopicSearch", "miscData", OldHal, NewHal
UpgradeTable "strikingSimiles", "TopicSearch", "miscData", OldHal, NewHal
UpgradeTable "asexualPersonality", "Brain", "mainBrain", OldHal, NewHal
UpgradeTable "patterns", "PatternMatch", "mainBrain", OldHal, NewHal
UpgradeTable "conversationalPhrases", "Sentence", "basicResponses", OldHal, NewHal
UpgradeTable "dontKnow", "Sentence", "basicResponses", OldHal, NewHal
UpgradeTable "noResponses", "Sentence", "yesNoResponses", OldHal, NewHal
UpgradeTable "yesResponses", "Sentence", "yesNoResponses", OldHal, NewHal