Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 4개 있습니다.)
(시리즈 글이 4개 있습니다.)
Windows: 82. 윈도우 8 - "Interactive Services Detection" 서비스 시작하는 방법
; https://www.sysnet.pe.kr/2/0/1583

Windows: 83. 윈도우 8 - UI가 있는 프로그램을 Local SYSTEM 권한의 세션 0 데스크톱에서 실행하는 방법
; https://www.sysnet.pe.kr/2/0/1584

개발 환경 구성: 265. TrustedInstaller 권한으로 프로그램 실행시키는 방법
; https://www.sysnet.pe.kr/2/0/2915

Windows: 209. Windows NT Service에서 UI를 다루는 방법
; https://www.sysnet.pe.kr/2/0/13120




윈도우 8 - UI가 있는 프로그램을 Local SYSTEM 권한의 세션 0 데스크톱에서 실행하는 방법

sysinternals의 psexec.exe를 이용하면 보호모드로 프로그램을 실행할 수도 있고,

보호 모드로 응용 프로그램 디버깅하는 방법
; https://www.sysnet.pe.kr/2/0/682

보호 모드로 응용 프로그램 디버깅하는 방법 - 두 번째 이야기
; https://www.sysnet.pe.kr/2/0/683

시스템(Local SYSTEM) 권한으로 실행하는 것도 가능합니다.

SYSTEM 권한으로 UI 프로그램 실행하는 방법
; https://www.sysnet.pe.kr/2/1/1153

위의 글에서는 UI 프로그램을 Local SYSTEM 권한으로 실행하지만 현재 로그인한 사용자 계정과 동일한 데스크톱 화면에서 활성화시킵니다.

혹시, 서비스 계정들이 활성화되는 세션 0 데스크톱에서 응용 프로그램을 보이게 하는 방법은 없을까요? psexec.exe에서 제공되는 옵션으로 실행해 보면,

C:\temp>psexec \\localhost -i 0 calc.exe

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

위와 같이 출력되다가 멈춰(hang)버립니다. 비록 멈춰있기는 하지만, process explorer를 이용해서 보면 세션 0에서 calc.exe가 실행된 것을 확인할 수 있습니다. 단지, 그 calc.exe가 실행을 종료할때까지 psexec.exe는 실행을 대기하기 때문에 멈춘 것처럼 보이는 것입니다.

그렇다면, 실제로 그 세션 0 데스크톱으로 넘어가서 실행된 calc.exe를 볼 수는 없는 걸까요?

이것이 가능하려면 우선 "Interactive Services Detection" 서비스를 시작해 두어야 합니다.

윈도우 8에서 "Interactive Services Detection" 서비스 시작하는 방법
; https://www.sysnet.pe.kr/2/0/1583

이 서비스를 시작해 두고 다시 "psexec \\localhost -i 0 calc.exe" 명령어를 실행하면 이번에는 작업 표시줄에 (UAC 인증 창처럼) 다음과 같은 모양의 아이콘이 깜빡입니다.

isd_taskbar_icon_1.png

What is Interactive Services Detection and Why is it Blinking at Me?
; http://blogs.msdn.com/b/patricka/archive/2010/04/27/what-is-interactive-services-detection-and-why-is-it-blinking-at-me.aspx

이를 선택하면 다음과 같은 대화창이 뜨는데요. (화면은 devenv.exe를 실행했을 때 캡처한 것입니다.)

isd_taskbar_icon_2.png

참고로, 위의 화면에서 "Why does this happen?" 링크를 누르면 다음과 같은 안내가 나옵니다.

Why can't a program display a message on my desktop?

Some devices and programs that are not fully compatible with Windows do not display their messages on your desktop, but might need your permission on other information to complete a task. To access these messages, click the View the message button.

Only one user at a time can view these messages. If another user is already viewing a message, you cannot check the request until after the other user has finished. Windows will notify you again if the request has not been resolved.

Check with the manufacturer of this device or program for more information on how to fix this issue.

If you disable the Interfactive Services Detection service, all future messages for all interactive services will be turned off. This means that you will no longer be able to view these types of messages.


따라서 "View the message"를 누르면 이제 현재 로그인 한 사용자의 데스크톱 화면에서 세션 0이 활성화된 데스크톱으로 화면 전환이 이뤄집니다.

isd_taskbar_icon_3.png

calc.exe가 실행된 것이 보이시죠? 아울러 다시 사용자의 로그온 데스크톱으로 돌아갈 수 있는 "Interactive Services Detection" 대화창도 함께 제공됩니다. ^^ 뭐 그다지 효용성이 없을 것 같지만 ^^ 세션 0 데스크톱 화면을 "눈으로 본다"는 것에 의미가 있다고 할 수 있습니다.




기타 몇 가지 정리해 봅니다. ^^


1. 재진입 불가능할 때

한번 세션 0 데스크톱으로 전환한 다음 다시 로그온 계정의 데스크톱으로 빠져나왔을 때 다시 psexec.exe를 실행시켜 세션 0으로 진입하고 싶어도 작업 표시줄에 전환 아이콘이 깜빡이지 않을 때가 있습니다.

저도 딱히 뾰족한 방법을 찾을 수 없었는데요. 이런 경우에는 재부팅해야 합니다. ^^; (물론, 다시 들어가고 싶지 않다면 그냥 사용하셔도 됩니다.)


2. Wacom BAMBOO 태블릿 사용 불능

세션 0 데스크톱으로 전환 후 다시 로그온 계정의 데스크톱으로 빠져나오면 그때부터 Bamboo 태블릿이 먹통이 됩니다. 태블릿 접속을 분리하고 다시 꽂으면 될 때도 있는데 그래도 마우스 우클릭이 작동하지 않습니다. 암튼, Wacom의 디바이스 드라이버는 마음에 들지 않습니다.


3. 작업 관리자나 탐색기 유의 프로그램은 실행 불능

세션 0 데스크톱으로 전환했을 때 다른 프로그램들을 자유롭게 실행시키기 위해 탐색기나 작업 관리자를 실행시키고 싶을 수도 있는데요. 웬일인지 그 안에서는 실행되지 않습니다. 그 외에 화면 캡처 프로그램인 "Snagit.exe"도 안 되고 "Process explorer" 등의 프로그램이 실행되지 않습니다. (다행히, 윈도우의 SnippingTool.exe는 실행이 되어서 이번 글의 화면 캡처는 할 수 있었습니다.)

만약, taskmgr.exe를 강제로 psexec.exe를 이용해 실행하게 되면 다음과 같은 오류만 떨어질 뿐 역시 실행되지 않습니다.

C:>psexec \\localhost -i 0 taskmgr.exe

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com


taskmgr.exe exited on localhost with error code -2147023728.

에러코드 -2147023728은 "Element not found" 입니다.




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

[연관 글]






[최초 등록일: ]
[최종 수정일: 8/16/2024]

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

비밀번호

댓글 작성자
 




... 166  167  168  169  [170]  171  172  173  174  175  176  177  178  179  180  ...
NoWriterDateCnt.TitleFile(s)
758정성태8/15/200923533VS.NET IDE: 65. WPF 프로젝트용 Visual Studio 패치들 [2]
757정성태8/12/200922944오류 유형: 84. TFS 작업 항목 보기 오류 - WorkItemTypeDeniedOrNotExistException
756정성태8/9/200922518오류 유형: 83. A revocation check could not be performed for the certificate.
755정성태8/6/200920253.NET Framework: 154. 이벤트 2중 구독
754정성태7/16/200932592VS.NET IDE: 64. Visual Studio 2010 - 64bit 혼합 모드 디버깅 지원
753정성태7/15/200931116.NET Framework: 153. WPF와 WinForm의 Shown 이벤트 시점
752정성태7/14/200926668개발 환경 구성: 46. .NET Service Bus 응용 사례: SocketShifter [2]파일 다운로드1
751정성태7/9/200928016.NET Framework: 152. 순환 참조와 XmlSerializer파일 다운로드1
750정성태7/7/200927745.NET Framework: 151. Team Explorer가 설치되지 않은 PC에서 System.InvalidProgramException 예외 발생파일 다운로드1
748정성태7/2/200925715.NET Framework: 150. WPF - Property Element 사용 의미파일 다운로드2
747정성태7/1/200945374.NET Framework: 149. WPF - UI 업데이트를 바로 반영하고 싶다면? [3]파일 다운로드1
746정성태6/25/200932464.NET Framework: 148. WPF - 데이터 바인딩 시의 예외 처리 방법 [1]파일 다운로드1
745정성태6/22/200924479.NET Framework: 147. WPF - Binding에 Sibling 요소 지정 [2]파일 다운로드1
744정성태6/21/200923321.NET Framework: 146. WPF - 중첩된 ScrollViewer의 크기 제어 [2]파일 다운로드1
743정성태6/17/200927387.NET Framework: 145. Unity Container 개체 풀이
742정성태6/17/200926909.NET Framework: 144. WPF - FrameworkElement.Parent 속성이 null이라면? [3]
740정성태6/12/200924530.NET Framework: 143. WPF - Transform의 역변환파일 다운로드1
739정성태6/8/200937262.NET Framework: 142. WPF - Grid 컨트롤의 ShowGridLine 개선 [5]파일 다운로드1
737정성태6/6/200942738.NET Framework: 141. Win32 Interop - 크기가 정해지지 않은 배열을 C++에서 C#으로 전달하는 경우파일 다운로드2
734정성태6/4/200926179.NET Framework: 140. WPF - CellPadding 속성을 구현하는 Grid Layout [2]파일 다운로드1
733정성태5/29/200931593.NET Framework: 139. WPF - "M/d/yyyy h:mm:ss tt" 형식으로만 날짜를 출력하는 문제
732정성태5/27/200926596Team Foundation Server: 32. 팀 빌드 오류 확인 방법
731정성태5/27/200921575Team Foundation Server: 31. 팀 빌드 스케줄 확인 방법
730정성태5/26/200927111VS.NET IDE: 63. Visual Studio 2010 - Parallel Stacks [1]
729정성태5/25/200926822.NET Framework: 138. InternalsVisibleTo와 Public Key 값
728정성태5/23/200937366.NET Framework: 137. C#에서 Union 구조체 다루기파일 다운로드1
... 166  167  168  169  [170]  171  172  173  174  175  176  177  178  179  180  ...