diff --git a/src/libopensc/ctx.c b/src/libopensc/ctx.c index 3f58e611..e012d02f 100644 --- a/src/libopensc/ctx.c +++ b/src/libopensc/ctx.c @@ -475,7 +475,7 @@ static void process_config_file(sc_context_t *ctx, struct _sc_ctx_options *opts) #ifdef _WIN32 conf_path = getenv("OPENSC_CONF"); if (!conf_path) { - rc = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\OpenSC", 0, KEY_QUERY_VALUE, &hKey); + rc = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\OpenSC Project\\OpenSC", 0, KEY_QUERY_VALUE, &hKey); if (rc == ERROR_SUCCESS) { temp_len = PATH_MAX; rc = RegQueryValueEx( hKey, "ConfigFile", NULL, NULL, (LPBYTE) temp_path, &temp_len); @@ -486,7 +486,7 @@ static void process_config_file(sc_context_t *ctx, struct _sc_ctx_options *opts) } if (!conf_path) { - rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\OpenSC", 0, KEY_QUERY_VALUE, &hKey ); + rc = RegOpenKeyEx( HKEY_LOCAL_MACHINE, "Software\\OpenSC Project\\OpenSC", 0, KEY_QUERY_VALUE, &hKey ); if (rc == ERROR_SUCCESS) { temp_len = PATH_MAX; rc = RegQueryValueEx( hKey, "ConfigFile", NULL, NULL, (LPBYTE) temp_path, &temp_len); diff --git a/src/pkcs15init/profile.c b/src/pkcs15init/profile.c index 63ae3919..9f873c55 100644 --- a/src/pkcs15init/profile.c +++ b/src/pkcs15init/profile.c @@ -328,7 +328,7 @@ sc_profile_load(struct sc_profile *profile, const char *filename) } if (!profile_dir) { #ifdef _WIN32 - rc = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\OpenSC", 0, KEY_QUERY_VALUE, &hKey); + rc = RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\OpenSC Project\\OpenSC", 0, KEY_QUERY_VALUE, &hKey); if (rc == ERROR_SUCCESS) { temp_len = PATH_MAX; rc = RegQueryValueEx(hKey, "ProfileDir", NULL, NULL, (LPBYTE) temp_path, &temp_len); @@ -337,7 +337,7 @@ sc_profile_load(struct sc_profile *profile, const char *filename) RegCloseKey(hKey); } if (!profile_dir) { - rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\OpenSC", 0, KEY_QUERY_VALUE, &hKey); + rc = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\OpenSC Project\\OpenSC", 0, KEY_QUERY_VALUE, &hKey); if (rc == ERROR_SUCCESS) { temp_len = PATH_MAX; rc = RegQueryValueEx(hKey, "ProfileDir", NULL, NULL, (LPBYTE) temp_path, &temp_len);