Registry backup/restore
-
I would like to write a routine to copy registry entries into an INI file then back into the registry, but the only functions I can find in CWinApp are WriteProfile and GetProfile. Does anybody know if there is anything built-in for this task or if it must be done manually?? Any suggestions are appriciated. Thanks! Is it football season yet... GO GATORS!!!
-
I would like to write a routine to copy registry entries into an INI file then back into the registry, but the only functions I can find in CWinApp are WriteProfile and GetProfile. Does anybody know if there is anything built-in for this task or if it must be done manually?? Any suggestions are appriciated. Thanks! Is it football season yet... GO GATORS!!!
unfortunately, there is no any appropriate functions in MFC for your task. Moreover, MFC does not include any routines for INI-support (as far as i know). You must do it manually, by WinAPI functions. See in MSDN: RegOpenKey[Ex], RegCloseKey and so on for Registry operation AND GetProfileInt, GetProfileSection, GetProfileString etc. for INI-operations
-
unfortunately, there is no any appropriate functions in MFC for your task. Moreover, MFC does not include any routines for INI-support (as far as i know). You must do it manually, by WinAPI functions. See in MSDN: RegOpenKey[Ex], RegCloseKey and so on for Registry operation AND GetProfileInt, GetProfileSection, GetProfileString etc. for INI-operations
-
I was afraid of that. Oh well, doesnt seem all that difficult to do manually so thats what ill do! Thanks.
There is an another way to solve your problem. You may use regedit with command-line params for saving and loading your data from reg-file. Like that regedit /e My.reg HKEY_CURRENT_USER\Software\My Data //From registry to file regedit -s My.reg //From file to registry You can use WINAPI - CreateProcess function to make this job silent
-
There is an another way to solve your problem. You may use regedit with command-line params for saving and loading your data from reg-file. Like that regedit /e My.reg HKEY_CURRENT_USER\Software\My Data //From registry to file regedit -s My.reg //From file to registry You can use WINAPI - CreateProcess function to make this job silent