Portable config/settings migration

murraybiscuit's profile image murraybiscuit posted 14 years ago in HeidiSQL portable Permalink
I'm wanting to migrate from v4 to v5.
It looks like the portable file structure has been flattened out and that the reg file has changed to a text file.
Which is fine, except that I can't import the old reg file into v5. It just adds it to my registry, which kind of defeats the point of a portable app...
Is there a way to import v4 server settings into v5?
ansgar's profile image ansgar posted 14 years ago Permalink
No, not some official method.

However, you could try a trick:
- edit your v4 reg file so that it imports into HKCU\Software\HeidiSQL
- doubleclick that .reg file to import it
- start v5 heidisql.exe from your preferred portable location, but in non-portable mode (means, no portable_settings.txt in the same directory)
- create an empty portable_settings.txt in the HeidiSQL directory.
- exit heidisql.exe . Settings should now be stored to the text file
murraybiscuit's profile image murraybiscuit posted 14 years ago Permalink
nope. sorry.
it seems to remember that it's in portable mode and doesn't write to the config file when it closes.
oh well.
let me know if you ever update it...
tx
ansgar's profile image ansgar posted 14 years ago Permalink
Hm, well if regedit.exe would allow drag and drop for keys and values that would be easy for you.

Probably it helps you to know how the portable logic works:
1. the very first thing a starting heidisql.exe does is look for a portable_settings.txt in the application directory. If present, a new, unique registry key is created, let's say
HKEY_CURRENT_USER\Software\HeidiSQL Portable 123

where "123" is the process id. Contents of the text file are parsed and imported into this new key.
2. when you close this heidisql.exe instance, registry values from the above created key is exported back to the text file, and the reg key gets deleted.

Knowing this, you could do the following:
1. start heidisql.exe in portable mode so you have a fresh registry key
2. start regedit.exe and watch out for the key name which was created (e.g. HKEY_CURRENT_USER\Software\HeidiSQL Portable 123\)
3. use notepad do edit your v4 reg file, change everything what points to
HKEY_CURRENT_USER\Software\HeidiSQL\
so it points to
HKEY_CURRENT_USER\Software\HeidiSQL Portable 123\
4. save and close the reg file, double click to import it
5. close heidisql.exe so reg values are stored to portable_settings.txt
murraybiscuit's profile image murraybiscuit posted 14 years ago Permalink
okay, not sure if regedit will allow me to import while the app is open, but i'll back up my system, set a restore point and try it out. there may also be issues with mismatching legacy keys from the app side - i'm not a desktop app developer, so i'll give it a shot.
murraybiscuit's profile image murraybiscuit posted 14 years ago Permalink
okay, cool. i imported the altered reg file with the process id and it all seems to be working okay... i'll post back here if i find any issues.

thanks for the help.
ansgar's profile image ansgar posted 14 years ago Permalink
Great. Very hackish though but if it works that's very ok.

Please login to leave a reply, or register at first.