Stand Alone EXe and Registry
I have to shift all the configuration setings from .ini file to registry. But the thing is that the application is a stand alone exe. We do not install it on the PC.
How do I go about doing it then.
# 1 Re: Stand Alone EXe and Registry
well, if you know how which ini-file you should use, it is pretty easy.
To read the ini-file, use GetPrivateProfile... functions.
To write the registry, there are lots of helper-classes available on www.dev-archive.com (http://www.dev-archive.com) and www.codeproject.com (http://www.codeproject.com).
Hopes this helps!
# 2 Re: Stand Alone EXe and Registry
Dunno abour ur problem,
but to add values into Registry u can use Platform-SDK functions,
RegSetValueEx to add into registry...
# 3 Re: Stand Alone EXe and Registry
Ok Ya Now it is clear as to how to do this.
but I am not able to decide the section of registry which shud be edited for this.
I mean under which keys am i going to put this information.
# 4 Re: Stand Alone EXe and Registry
well, what information needs to be stored??
User dependant information? Then use HKEY_CURRENT_USER\Software\YourCompany\YourSoftware
If it is machine dependant, use this:
HKEY_LOCAL_MACHINE\Software\YourCompany\YourSoftware
Use regedit to see how other applications store their information.
# 5 Re: Stand Alone EXe and Registry
Basing on ur usage, if for a machine wide.. u can use
HKLM\Software...