* @brief Save registry keys to .reg file if existing .reg file */
| 222 | * @brief Save registry keys to .reg file if existing .reg file |
| 223 | */ |
| 224 | bool SaveRegistryToFile(const String& sRegFilePath, const String& sRegDir) |
| 225 | { |
| 226 | if (paths::DoesPathExist(sRegFilePath) != paths::IS_EXISTING_FILE) |
| 227 | return false; |
| 228 | DeleteFile(sRegFilePath.c_str()); |
| 229 | return launchProgram(_T("reg.exe export HKCU\\") + sRegDir + _T(" \"") + sRegFilePath + _T("\""), SW_HIDE); |
| 230 | } |
| 231 | |
| 232 | } |