Author: mjansen Date: Sat Jul 1 11:37:44 2017 New Revision: 75256 URL: http://svn.reactos.org/svn/reactos?rev=75256&view=rev Log: [ACPPAGE] Register the extension + allow it to be disabled with policies. Disable it with the rest of the app compat infrastructure. CORE-10375
Modified: trunk/reactos/boot/bootdata/hivesft.inf trunk/reactos/boot/bootdata/hivesys.inf trunk/reactos/dll/shellext/acppage/CLayerUIPropPage.cpp trunk/reactos/media/inf/syssetup.inf Modified: trunk/reactos/boot/bootdata/hivesft.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesft.inf?rev=75256&r1=75255&r2=75256&view=diff ============================================================================== --- trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesft.inf [iso-8859-1] Sat Jul 1 11:37:44 2017 @@ -1685,6 +1685,9 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows","swapdisk",0x00000000,"" 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 ------------------------------- Modified: trunk/reactos/boot/bootdata/hivesys.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?rev=75256&r1=75255&r2=75256&view=diff ============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Sat Jul 1 11:37:44 2017 @@ -1453,9 +1453,6 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems","Posix",0x00020000,"%SystemRoot%\system32\psxss.exe" 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, \ Modified: trunk/reactos/dll/shellext/acppage/CLayerUIPropPage.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/shellext/acppage/CLayerUIPropPage.cpp?rev=75256&r1=75255&r2=75256&view=diff ============================================================================== --- trunk/reactos/dll/shellext/acppage/CLayerUIPropPage.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/shellext/acppage/CLayerUIPropPage.cpp [iso-8859-1] Sat Jul 1 11:37:44 2017 @@ -561,11 +561,43 @@ 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)) { Modified: trunk/reactos/media/inf/syssetup.inf URL: http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/syssetup.inf?rev=75256&r1=75255&r2=75256&view=diff ============================================================================== --- trunk/reactos/media/inf/syssetup.inf [iso-8859-1] (original) +++ trunk/reactos/media/inf/syssetup.inf [iso-8859-1] Sat Jul 1 11:37:44 2017 @@ -35,7 +35,7 @@ [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