From b966f77f73a8c887c37475598085df112817ba6a Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 15 Feb 2003 11:07:09 +0000 Subject: [PATCH] Minimal required security clearance so we'll get by for sure git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2162 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 3183242e..32ce88df 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -52,7 +52,7 @@ static WIN32_FIND_DATA * NSISCALL file_exists(char *buf) static LONG NSISCALL myRegDeleteKeyEx(HKEY thiskey, LPCTSTR lpSubKey, int onlyifempty) { HKEY key; - int retval=RegOpenKeyEx(thiskey,lpSubKey,0,KEY_WRITE,&key); + int retval=RegOpenKeyEx(thiskey,lpSubKey,0,0,&key); if (retval==ERROR_SUCCESS) { // NB - don't change this to static (recursive function) @@ -1158,7 +1158,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) if (!parm3) { HKEY hKey; - if (RegOpenKeyEx((HKEY)rootkey,buf3,0,KEY_WRITE,&hKey) == ERROR_SUCCESS) + if (RegOpenKeyEx((HKEY)rootkey,buf3,0,KEY_SET_VALUE,&hKey) == ERROR_SUCCESS) { char *buf0=process_string_fromparm_tobuf(0x02); log_printf4("DeleteRegValue: %d\\%s\\%s",rootkey,buf3,buf0); @@ -1251,7 +1251,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) int b=process_string_fromparm_toint(3); char *buf1=process_string_fromparm_tobuf(0x12); p[0]=0; - if (RegOpenKeyEx((HKEY)parm1,buf1,0,KEY_ALL_ACCESS,&key) == ERROR_SUCCESS) + if (RegOpenKeyEx((HKEY)parm1,buf1,0,KEY_READ,&key) == ERROR_SUCCESS) { DWORD d=NSIS_MAX_STRLEN-1; if (parm4) RegEnumKey(key,b,p,d);