I have an application which I am using an installer to create an installer package for Windows. As part of the install process, the installer puts a data file into the {localappdata} directory, which varies according to the different flavor of os. In order for my app to know positively where the installer placed this file, the installer writes a key to the registry with the path. Then, when my app starts up, it looks for the key, and if present, sets that value so that it can find the data file.
After the first run, the application stores this path in its own QSettings object. Therefore, after reading this key, I would like to delete it. That is where I am having a spot of difficulty.
The key is HKCU/Temp_fsfdb/data_path/"path string"
I have tried
settings.remove("Temp_fsfdb");
QSettings settings("HKEY_CURRENT_USER", QSettings::NativeFormat);
settings.remove("Temp_fsfdb");
To copy to clipboard, switch view to plain text mode
and
settings.remove("Temp_fsfdb");
QSettings settings("HKEY_CURRENT_USER/Temp_fsfdb", QSettings::NativeFormat);
settings.remove("Temp_fsfdb");
To copy to clipboard, switch view to plain text mode
neither of which have garnered success.
I have also tried
settings.beginGroup("Temp_fsfdb");
settings.remove("");
settings.endGroup();
QSettings settings("HKEY_CURRENT_USER/Temp_fsfdb", QSettings::NativeFormst);
settings.beginGroup("Temp_fsfdb");
settings.remove("");
settings.endGroup();
To copy to clipboard, switch view to plain text mode
Again, no joy.
Would someone be willing to show me the proper way to use remove() or perhaps clear() to accomplish removal of the Temp_fsfdb and it's descendants?
Bookmarks