Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

DLL 로딩 시 0x800704ec - This Program is Blocked by Group Policy

이상하군요, 고객사 시스템에서 COM DLL을 로딩하지 못해 로그가 남습니다.

.NET Runtime version 4.0.30319.0 - Loading profiler failed during CoCreateInstance.  Profiler CLSID: '{6C7CAF0F-D0E5-4274-A71B-6551761BBDC8}'.  HRESULT: 0x800704ec.  Process ID (decimal): 10828.  Message ID: [0x2504].

0x800704ec 오류 메시지는 Error Lookup 도구로 보면 이렇게 나옵니다.

This program is blocked by group policy. For more information, contact your system administrator. 

이에 대한 해결책의 실마리는 다음의 글에서 찾을 수 있는데요,

3 Ways to Fix This Program is Blocked by Group Policy Windows 10
; https://www.isunshare.com/blog/this-program-is-blocked-by-group-policy-error-windows-10/

모두 윈도우에서 제공하는 다양한 lock-down 정책을 풀어버리는 방법을 설명합니다.

method 1.  gpedit.msc 
    User Configuration > Administrative Templates > System. In the right pane, scroll down and find out Don’t run specified Windows application.

method 2. Local Security Policy - Software Restriction Policies > Enforcement
    Under Apply software restriction policies to the following users, select All users except local administrators. Tap on Apply and restart your PC.

method 3. delete all items in Microsoft folder.
    HKEY_LOCAL_MACHINE\Software\Policies\Microsoft
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Group Policy
    HKEY_CURRENT_USER\Software\Policies\Microsoft
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies

그런데, 저런 식으로 해결하는 것은 자신의 컴퓨터에서나 할 수 있지, 고객사의 서버 시스템에서 레지스트리 키를 통째로 다 지우는 건 허용되지 않는 경우가 보통입니다. 따라서, 정확한 해결책을 집어내야 하는데요, 제 경우와 관련해서 문제가 되었던 것은 AppLocker의 "DLL Rules" 때문이었습니다.

Windows - AppLocker의 "DLL Rules"를 이용해 임의 경로에 설치한 DLL의 로딩을 막는 방법
; https://www.sysnet.pe.kr/2/0/12454

만약, 특정 DLL이 D:\temp에 있고 다른 응용 프로그램에서 그 DLL을 로드해야 한다면 해당 폴더를 "Everyone" 계정으로 접근할 수 있는 또 다른 "DLL Rules"를 추가해야 합니다.

- Action : Allow
- User : Everyone
- Condition : Path
- Value : D:\temp\*

Understanding AppLocker allow and deny actions on rules
; https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-application-control/applocker/understanding-applocker-allow-and-deny-actions-on-rules

혹은, 그 DLL을 사용하는 EXE 프로세스를 임시로 사용자가 직접 실행시키는 유형이라면 AppLocker에 별도 DLL Rule을 정의하기보다 관리자 권한으로 상승시켜 실행하는 것도 한 방법이 될 수 있습니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 12/15/2020]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




1  2  3  4  5  6  7  8  9  10  11  12  [13]  14  15  ...
NoWriterDateCnt.TitleFile(s)
13297정성태3/26/20234355Windows: 235. Win32 - Code Modal과 UI Modal
13296정성태3/25/20233693Windows: 234. IsDialogMessage와 협업하는 WM_GETDLGCODE Win32 메시지 [1]파일 다운로드1
13295정성태3/24/20233958Windows: 233. Win32 - modeless 대화창을 modal처럼 동작하게 만드는 방법파일 다운로드1
13294정성태3/22/20234131.NET Framework: 2105. LargeAddressAware 옵션이 적용된 닷넷 32비트 프로세스의 가용 메모리 - 두 번째
13293정성태3/22/20234199오류 유형: 853. dumpbin - warning LNK4048: Invalid format file; ignored
13292정성태3/21/20234328Windows: 232. C/C++ - 일반 창에도 사용 가능한 IsDialogMessage파일 다운로드1
13291정성태3/20/20234739.NET Framework: 2104. C# Windows Forms - WndProc 재정의와 IMessageFilter 사용 시의 차이점
13290정성태3/19/20234245.NET Framework: 2103. C# - 윈도우에서 기본 제공하는 FindText 대화창 사용법파일 다운로드1
13289정성태3/18/20233438Windows: 231. Win32 - 대화창 템플릿의 2진 리소스를 읽어들여 자식 윈도우를 생성하는 방법파일 다운로드1
13288정성태3/17/20233550Windows: 230. Win32 - 대화창의 DLU 단위를 pixel로 변경하는 방법파일 다운로드1
13287정성태3/16/20233706Windows: 229. Win32 - 대화창 템플릿의 2진 리소스를 읽어들여 윈도우를 직접 띄우는 방법파일 다운로드1
13286정성태3/15/20234163Windows: 228. Win32 - 리소스에 포함된 대화창 Template의 2진 코드 해석 방법
13285정성태3/14/20233755Windows: 227. Win32 C/C++ - Dialog Procedure를 재정의하는 방법파일 다운로드1
13284정성태3/13/20233955Windows: 226. Win32 C/C++ - Dialog에서 값을 반환하는 방법파일 다운로드1
13283정성태3/12/20233496오류 유형: 852. 파이썬 - TypeError: coercing to Unicode: need string or buffer, NoneType found
13282정성태3/12/20233819Linux: 58. WSL - nohup 옵션이 필요한 경우
13281정성태3/12/20233726Windows: 225. 윈도우 바탕화면의 아이콘들이 넓게 퍼지는 경우 [2]
13280정성태3/9/20234493개발 환경 구성: 670. WSL 2에서 호스팅 중인 TCP 서버를 외부에서 접근하는 방법
13279정성태3/9/20234042오류 유형: 851. 파이썬 ModuleNotFoundError: No module named '_cffi_backend'
13278정성태3/8/20234012개발 환경 구성: 669. WSL 2의 (init이 아닌) systemd 지원 [1]
13277정성태3/6/20234654개발 환경 구성: 668. 코드 사인용 인증서 신청 및 적용 방법(예: Digicert)
13276정성태3/5/20234334.NET Framework: 2102. C# 11 - ref struct/ref field를 위해 새롭게 도입된 scoped 예약어
13275정성태3/3/20234692.NET Framework: 2101. C# 11의 ref 필드 설명
13274정성태3/2/20234275.NET Framework: 2100. C# - ref 필드로 ref struct 타입을 허용하지 않는 이유
13273정성태2/28/20233973.NET Framework: 2099. C# - 관리 포인터로서의 ref 예약어 의미
13272정성태2/27/20234234오류 유형: 850. SSMS - mdf 파일을 Attach 시킬 때 Operating system error 5: "5(Access is denied.)" 에러
1  2  3  4  5  6  7  8  9  10  11  12  [13]  14  15  ...