Mercurial > trustbridge
comparison common/util.c @ 1348:b90df38bb6dc
Include organization to determine if it is root installation
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 30 Oct 2014 11:19:18 +0100 |
parents | 8362e30f7b55 |
children | fdef94da2d70 |
comparison
equal
deleted
inserted
replaced
1347:e3aeaef007f6 | 1348:b90df38bb6dc |
---|---|
23 #include <shlobj.h> | 23 #include <shlobj.h> |
24 #endif | 24 #endif |
25 | 25 |
26 #ifndef APPNAME | 26 #ifndef APPNAME |
27 #define APPNAME "TrustBridge" | 27 #define APPNAME "TrustBridge" |
28 #endif | |
29 | |
30 #ifndef ORGANIZATION | |
31 #define ORGANIZATION "BSI" | |
28 #endif | 32 #endif |
29 | 33 |
30 #ifdef WIN32 | 34 #ifdef WIN32 |
31 char* | 35 char* |
32 read_registry_string (const HKEY root, const wchar_t *key, | 36 read_registry_string (const HKEY root, const wchar_t *key, |
285 char *reg_inst_dir = NULL, | 289 char *reg_inst_dir = NULL, |
286 *real_prefix = NULL; | 290 *real_prefix = NULL; |
287 bool ret = false; | 291 bool ret = false; |
288 | 292 |
289 reg_inst_dir = read_registry_string (HKEY_LOCAL_MACHINE, | 293 reg_inst_dir = read_registry_string (HKEY_LOCAL_MACHINE, |
290 L"Software\\"APPNAME, L""); | 294 L"Software\\"ORGANIZATION"\\"APPNAME, L""); |
291 | 295 |
292 if (reg_inst_dir == NULL) | 296 if (reg_inst_dir == NULL) |
293 { | 297 { |
294 return false; | 298 return false; |
295 } | 299 } |