[ACPPAGE] Register the extension + allow it to be disabled with policies. Disable it with the rest of the app compat infrastructure. CORE-10375

svn path=/trunk/; revision=75256
This commit is contained in:
Mark Jansen 2017-07-01 11:37:44 +00:00
parent b4533fa94a
commit 1fa3c1a922
4 changed files with 36 additions and 4 deletions

View file

@ -1686,6 +1686,9 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","swapdisk",0x0000000
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","TransmissionRetryTimeout",0x00000000,"90"
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","USERProcessHandleQuota",0x00010001,0x2710
; App Compat -- Disable on ReactOS
HKLM,"SOFTWARE\Policies\Microsoft\Windows\AppCompat","DisableEngine",0x00010003, 0x00000001
;-------------------------------- STRINGS -------------------------------
[Strings]

View file

@ -1454,9 +1454,6 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Posix",0x000
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Required",0x00010000,"Debug","Windows"
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Windows",0x00020000,"%SystemRoot%\system32\csrss.exe ObjectDirectory=\Windows SharedSection=1024,12288,512 Windows=On SubSystemType=Windows ServerDll=basesrv,1 ServerDll=winsrv:UserServerDllInitialization,3 ServerDll=winsrv:ConServerDllInitialization,2 ProfileControl=Off MaxRequestThreads=16"
; App Compat -- Disable on ReactOS
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatibility","DisableAppCompat",0x00010003, 0x00000001
; This is an empty App Compat cache
HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\AppCompatCache","AppCompatCache", 0x00000001, \
fe,0f,dc,ba,00,00,00,00

View file

@ -561,11 +561,43 @@ INT_PTR CALLBACK CLayerUIPropPage::EditModesProc(HWND hWnd, UINT uMsg, WPARAM wP
return FALSE;
}
static BOOL DisableShellext()
{
HKEY hkey;
LSTATUS ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Policies\\Microsoft\\Windows\\AppCompat", 0, KEY_QUERY_VALUE, &hkey);
BOOL Disable = FALSE;
if (ret == ERROR_SUCCESS)
{
DWORD dwValue = 0;
DWORD type, size = sizeof(dwValue);
ret = RegQueryValueExW(hkey, L"DisableEngine", NULL, &type, (PBYTE)&dwValue, &size);
if (ret == ERROR_SUCCESS && type == REG_DWORD)
{
Disable = !!dwValue;
}
if (!Disable)
{
size = sizeof(dwValue);
ret = RegQueryValueExW(hkey, L"DisablePropPage", NULL, &type, (PBYTE)&dwValue, &size);
if (ret == ERROR_SUCCESS && type == REG_DWORD)
{
Disable = !!dwValue;
}
}
RegCloseKey(hkey);
}
return Disable;
}
STDMETHODIMP CLayerUIPropPage::Initialize(LPCITEMIDLIST pidlFolder, LPDATAOBJECT pDataObj, HKEY hkeyProgID)
{
FORMATETC etc = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
STGMEDIUM stg;
if (DisableShellext())
return E_ACCESSDENIED;
HRESULT hr = pDataObj->GetData(&etc, &stg);
if (FAILED(hr))
{

View file

@ -35,7 +35,7 @@ AddReg=Classes
[OleControlDlls]
11,,atl.dll,1
11,,actxprxy.dll,1
;11,,acppage.dll,1
11,,acppage.dll,1
11,,amstream.dll,1
11,,avifil32.dll,1
11,,browseui.dll,1