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

비밀번호

댓글 작성자
 




1  2  3  4  5  6  [7]  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13768정성태10/15/20245396C/C++: 179. C++ - _O_WTEXT, _O_U16TEXT, _O_U8TEXT의 Unicode stream 모드파일 다운로드2
13767정성태10/14/20244771오류 유형: 929. bpftrace 수행 시 "ERROR: Could not resolve symbol: /proc/self/exe:BEGIN_trigger"
13766정성태10/14/20244553C/C++: 178. C++ - 파일에 대한 Text 모드의 "translated" 동작파일 다운로드1
13765정성태10/12/20245265오류 유형: 928. go build 시 "package maps is not in GOROOT" 오류
13764정성태10/11/20245631Linux: 85. Ubuntu - 원하는 golang 버전 설치
13763정성태10/11/20244985Linux: 84. WSL / Ubuntu 20.04 - bpftool 설치
13762정성태10/11/20245010Linux: 83. WSL / Ubuntu 22.04 - bpftool 설치
13761정성태10/11/20244914오류 유형: 927. WSL / Ubuntu - /usr/include/linux/types.h:5:10: fatal error: 'asm/types.h' file not found
13760정성태10/11/20245450Linux: 82. Ubuntu - clang 최신(stable) 버전 설치
13759정성태10/10/20246366C/C++: 177. C++ - 자유 함수(free function) 및 주소 지정 가능한 함수(addressable function) [6]
13758정성태10/8/20245578오류 유형: 926. dotnet tools를 sudo로 실행하는 경우 command not found
13757정성태10/8/20245521닷넷: 2306. Linux - dotnet tool의 설치 디렉터리가 PATH 환경변수에 자동 등록이 되는 이유
13756정성태10/8/20245626오류 유형: 925. ssh로 docker 접근을 할 때 "... malformed HTTP status code ..." 오류 발생
13755정성태10/7/20246025닷넷: 2305. C# 13 - (9) 메서드 바인딩의 우선순위를 지정하는 OverloadResolutionPriority 특성 도입 (Overload resolution priority)파일 다운로드1
13754정성태10/4/20245578닷넷: 2304. C# 13 - (8) 부분 메서드 정의를 속성 및 인덱서에도 확대파일 다운로드1
13753정성태10/4/20245594Linux: 81. Linux - PATH 환경변수의 적용 규칙
13752정성태10/2/20246280닷넷: 2303. C# 13 - (7) ref struct의 interface 상속 및 제네릭 제약으로 사용 가능 [6]파일 다운로드1
13751정성태10/2/20245407C/C++: 176. C/C++ - ARM64로 포팅할 때 유의할 점
13750정성태10/1/20245293C/C++: 175. C++ - WinMain/wWinMain 호출 전의 CRT 초기화 단계
13749정성태9/30/20245536닷넷: 2302. C# - ssh-keygen으로 생성한 Private Key와 Public Key 연동파일 다운로드1
13748정성태9/29/20245743닷넷: 2301. C# - BigInteger 타입이 byte 배열로 직렬화하는 방식
13747정성태9/28/20245592닷넷: 2300. C# - OpenSSH의 공개키 파일에 대한 "BEGIN OPENSSH PUBLIC KEY" / "END OPENSSH PUBLIC KEY" PEM 포맷파일 다운로드1
13746정성태9/28/20245687오류 유형: 924. Python - LocalProtocolError("Illegal header value ...")
13745정성태9/28/20245550Linux: 80. 리눅스 - 실행 중인 프로세스 내부의 환경변수 설정을 구하는 방법 (lldb)
13744정성태9/27/20245980닷넷: 2299. C# - Windows Hello 사용자 인증 다이얼로그 표시하기파일 다운로드1
13743정성태9/26/20246427닷넷: 2298. C# - Console 프로젝트에서의 await 대상으로 Main 스레드 활용하는 방법 [1]
1  2  3  4  5  6  [7]  8  9  10  11  12  13  14  15  ...