зеркало из https://github.com/mozilla/gecko-dev.git
use parent of windows directory as "program files" directory, if no program
files directory exists bug 238133 r=dveditz sr=roc
This commit is contained in:
Родитель
368c5f07f7
Коммит
5f4e7cb5b0
|
@ -7948,11 +7948,31 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
|
|||
{
|
||||
/* parse for the "c:\Program Files" directory */
|
||||
GetWinReg(HKEY_LOCAL_MACHINE, szWRMSCurrentVersion, "ProgramFilesDir", szVariable, dwVariableSize);
|
||||
/* see if that failed */
|
||||
if (*szVariable == 0)
|
||||
{
|
||||
char* backslash;
|
||||
/* Use the parent of the windows directory */
|
||||
GetWindowsDirectory(szVariable, dwVariableSize);
|
||||
backslash = strrchr(szVariable, '\\');
|
||||
if (backslash)
|
||||
*backslash = 0;
|
||||
}
|
||||
}
|
||||
else if(lstrcmpi(szVariable, "PROGRAMFILESPATH") == 0)
|
||||
{
|
||||
/* parse for the "\Program Files" directory -- NOTE does not include the drive letter */
|
||||
GetWinReg(HKEY_LOCAL_MACHINE, szWRMSCurrentVersion, "ProgramFilesDir", szBuf, sizeof(szBuf));
|
||||
/* see if that failed */
|
||||
if (*szBuf == 0)
|
||||
{
|
||||
char* backslash;
|
||||
/* Use the parent of the windows directory */
|
||||
GetWindowsDirectory(szBuf, sizeof(szBuf));
|
||||
backslash = strrchr(szBuf, '\\');
|
||||
if (backslash)
|
||||
*backslash = 0;
|
||||
}
|
||||
lstrcpy(szVariable, szBuf+2);
|
||||
}
|
||||
else if(lstrcmpi(szVariable, "INSTALLDRIVE") == 0)
|
||||
|
|
|
@ -2202,6 +2202,16 @@ HRESULT DecryptVariable(LPSTR szVariable, DWORD dwVariableSize)
|
|||
{
|
||||
/* parse for the "c:\Program Files" directory */
|
||||
GetWinReg(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir", szVariable, dwVariableSize);
|
||||
/* see if that failed */
|
||||
if (*szVariable == 0)
|
||||
{
|
||||
char* backslash;
|
||||
/* Use the parent of the windows directory */
|
||||
GetWindowsDirectory(szVariable, dwVariableSize);
|
||||
backslash = strrchr(szVariable, '\\');
|
||||
if (backslash)
|
||||
*backslash = 0;
|
||||
}
|
||||
}
|
||||
else if(lstrcmpi(szVariable, "COMMONFILESDIR") == 0)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче