diff options
| -rw-r--r-- | nt/ChangeLog | 3 | ||||
| -rw-r--r-- | nt/addpm.c | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 9cf0aef8532..e0a5a417528 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2006-03-12 Jason Rumney <jasonr@gnu.org> | 1 | 2006-03-12 Jason Rumney <jasonr@gnu.org> |
| 2 | 2 | ||
| 3 | * addpm.c (add_registry): Don't change the registry unless keys | ||
| 4 | already exist from a previous version. | ||
| 5 | |||
| 3 | * makefile.w32-in (install): Use -q when invoking addpm. | 6 | * makefile.w32-in (install): Use -q when invoking addpm. |
| 4 | 7 | ||
| 5 | * addpm.c (main): Accept -q as alternative for /q. | 8 | * addpm.c (main): Accept -q as alternative for /q. |
diff --git a/nt/addpm.c b/nt/addpm.c index e882b23b5b1..08d84c70b81 100644 --- a/nt/addpm.c +++ b/nt/addpm.c | |||
| @@ -71,19 +71,23 @@ add_registry (path) | |||
| 71 | char *path; | 71 | char *path; |
| 72 | { | 72 | { |
| 73 | HKEY hrootkey = NULL; | 73 | HKEY hrootkey = NULL; |
| 74 | DWORD dwDisp; | ||
| 75 | int i; | 74 | int i; |
| 76 | BOOL ok = TRUE; | 75 | BOOL ok = TRUE; |
| 77 | 76 | ||
| 77 | /* Previous versions relied on registry settings, but we do not need | ||
| 78 | them any more. If registry settings are installed from a previous | ||
| 79 | version, replace them to ensure they are the current settings. | ||
| 80 | Otherwise, do nothing. */ | ||
| 81 | |||
| 78 | /* Check both the current user and the local machine to see if we | 82 | /* Check both the current user and the local machine to see if we |
| 79 | have any resources. */ | 83 | have any resources. */ |
| 80 | 84 | ||
| 81 | if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, | 85 | if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, REG_ROOT, |
| 82 | 0, "", REG_OPTION_NON_VOLATILE, | 86 | REG_OPTION_NON_VOLATILE, |
| 83 | KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS | 87 | KEY_WRITE, &hrootkey) != ERROR_SUCCESS |
| 84 | && RegCreateKeyEx (HKEY_CURRENT_USER, REG_ROOT, | 88 | && RegOpenKeyEx (HKEY_CURRENT_USER, REG_ROOT, |
| 85 | 0, "", REG_OPTION_NON_VOLATILE, | 89 | REG_OPTION_NON_VOLATILE, |
| 86 | KEY_WRITE, NULL, &hrootkey, &dwDisp) != ERROR_SUCCESS) | 90 | KEY_WRITE, &hrootkey) != ERROR_SUCCESS) |
| 87 | { | 91 | { |
| 88 | return FALSE; | 92 | return FALSE; |
| 89 | } | 93 | } |