성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>윈도우 8 - UI가 있는 프로그램을 Local SYSTEM 권한의 세션 0 데스크톱에서 실행하는 방법</h1> <p> sysinternals의 psexec.exe를 이용하면 보호모드로 프로그램을 실행할 수도 있고,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 보호 모드로 응용 프로그램 디버깅하는 방법 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/682'>http://www.sysnet.pe.kr/2/0/682</a> 보호 모드로 응용 프로그램 디버깅하는 방법 - 두 번째 이야기 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/683'>http://www.sysnet.pe.kr/2/0/683</a> </pre> <br /> 시스템(Local SYSTEM) 권한으로 실행하는 것도 가능합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > SYSTEM 권한으로 UI 프로그램 실행하는 방법 ; <a target='tab' href='http://www.sysnet.pe.kr/2/1/1153'>http://www.sysnet.pe.kr/2/1/1153</a> </pre> <br /> 위의 글에서는 UI 프로그램을 Local SYSTEM 권한으로 실행하지만 현재 로그인한 사용자 계정과 동일한 데스크톱 화면에서 활성화시킵니다.<br /> <br /> 혹시, 서비스 계정들이 활성화되는 세션 0 데스크톱에서 응용 프로그램을 보이게 하는 방법은 없을까요? psexec.exe에서 제공되는 옵션으로 실행해 보면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp><span style='color: blue; font-weight: bold'>psexec \\localhost -i 0 calc.exe</span> PsExec v1.98 - Execute processes remotely Copyright (C) 2001-2010 Mark Russinovich Sysinternals - www.sysinternals.com </pre> <br /> 위와 같이 출력되다가 멈춰(hang)버립니다. 비록 멈춰있기는 하지만, process explorer를 이용해서 보면 세션 0에서 calc.exe가 실행된 것을 확인할 수 있습니다. 단지, 그 calc.exe가 실행을 종료할때까지 psexec.exe는 실행을 대기하기 때문에 멈춘 것처럼 보이는 것입니다.<br /> <br /> 그렇다면, 실제로 그 세션 0 데스크톱으로 넘어가서 실행된 calc.exe를 볼 수는 없는 걸까요?<br /> <br /> 이것이 가능하려면 우선 "Interactive Services Detection" 서비스를 시작해 두어야 합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 윈도우 8에서 "Interactive Services Detection" 서비스 시작하는 방법 ; <a target='tab' href='http://www.sysnet.pe.kr/2/0/1583'>http://www.sysnet.pe.kr/2/0/1583</a> </pre> <br /> 이 서비스를 시작해 두고 다시 "psexec \\localhost -i 0 calc.exe" 명령어를 실행하면 이번에는 작업 표시줄에 (UAC 인증 창처럼) 다음과 같은 모양의 아이콘이 깜빡입니다.<br /> <br /> <img alt='isd_taskbar_icon_1.png' src='/SysWebRes/bbs/isd_taskbar_icon_1.png' /> <br /><br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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 </pre> <br /> 이를 선택하면 다음과 같은 대화창이 뜨는데요. (화면은 devenv.exe를 실행했을 때 캡처한 것입니다.)<br /> <br /> <img alt='isd_taskbar_icon_2.png' src='/SysWebRes/bbs/isd_taskbar_icon_2.png' /> <br /><br /> 참고로, 위의 화면에서 "Why does this happen?" 링크를 누르면 다음과 같은 안내가 나옵니다.<br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> Why can't a program display a message on my desktop?<br /> <br /> 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.<br /> <br /> 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.<br /> <br /> Check with the manufacturer of this device or program for more information on how to fix this issue.<br /> <br /> 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.<br /> </div><br /> <br /> 따라서 "View the message"를 누르면 이제 현재 로그인 한 사용자의 데스크톱 화면에서 세션 0이 활성화된 데스크톱으로 화면 전환이 이뤄집니다.<br /> <br /> <img alt='isd_taskbar_icon_3.png' src='/SysWebRes/bbs/isd_taskbar_icon_3.png' /> <br /><br /> calc.exe가 실행된 것이 보이시죠? 아울러 다시 사용자의 로그온 데스크톱으로 돌아갈 수 있는 "Interactive Services Detection" 대화창도 함께 제공됩니다. ^^ 뭐 그다지 효용성이 없을 것 같지만 ^^ 세션 0 데스크톱 화면을 "눈으로 본다"는 것에 의미가 있다고 할 수 있습니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> 기타 몇 가지 정리해 봅니다. ^^<br /> <br /> <br /><div style='font-size: 12pt; font-family: Malgun Gothic, Consolas; color: #2211AA; text-align: left; font-weight: bold'>1. 재진입 불가능할 때</div> <br /> 한번 세션 0 데스크톱으로 전환한 다음 다시 로그온 계정의 데스크톱으로 빠져나왔을 때 다시 psexec.exe를 실행시켜 세션 0으로 진입하고 싶어도 작업 표시줄에 전환 아이콘이 깜빡이지 않을 때가 있습니다.<br /> <br /> 저도 딱히 뾰족한 방법을 찾을 수 없었는데요. 이런 경우에는 재부팅해야 합니다. ^^; (물론, 다시 들어가고 싶지 않다면 그냥 사용하셔도 됩니다.)<br /> <br /> <br /><div style='font-size: 12pt; font-family: Malgun Gothic, Consolas; color: #2211AA; text-align: left; font-weight: bold'>2. Wacom BAMBOO 태블릿 사용 불능</div> <br /> 세션 0 데스크톱으로 전환 후 다시 로그온 계정의 데스크톱으로 빠져나오면 그때부터 Bamboo 태블릿이 먹통이 됩니다. 태블릿 접속을 분리하고 다시 꽂으면 될 때도 있는데 그래도 마우스 우클릭이 작동하지 않습니다. 암튼, <a target='tab' href='http://www.sysnet.pe.kr/0/0/472'>Wacom의 디바이스 드라이버는 마음에 들지 않습니다.</a><br /> <br /> <br /><div style='font-size: 12pt; font-family: Malgun Gothic, Consolas; color: #2211AA; text-align: left; font-weight: bold'>3. 작업 관리자나 탐색기 류의 프로그램은 실행 불능</div> <br /> 세션 0 데스크톱으로 전환했을 때 다른 프로그램들을 자유롭게 실행시키기 위해 탐색기나 작업 관리자를 실행시키고 싶을 수도 있는데요. 웬일인지 그 안에서는 실행되지 않습니다. 그 외에 화면 캡처 프로그램인 "Snagit.exe"도 안 되고 "Process explorer" 등의 프로그램이 실행되지 않습니다. (다행히, 윈도우의 SnippingTool.exe는 실행이 되어서 이번 글의 화면 캡처는 할 수 있었습니다.)<br /> <br /> 만약, taskmgr.exe를 강제로 psexec.exe를 이용해 실행하게 되면 다음과 같은 오류만 떨어질 뿐 역시 실행되지 않습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > 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. </pre> <br /> 에러코드 -2147023728은 "Element not found" 입니다.<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1211
(왼쪽의 숫자를 입력해야 합니다.)