• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆-60  評論-262  文章-1  trackbacks-0

            原始鏈接: https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=3223434&SiteID=1

            Hi Guys,

            My goal is to run a program before user even log on to system in vista. Here are couple of links i have already went through. These codes are working fine when ever we are dealing with WinSta0\\default desktop when user is log on but my requirements are different.

            http://www.codeproject.com/KB/vista-security/VistaSessions.aspx?fid=406624&sort=Position&noise=3&view=Quick&mpp=50&df=1

            http://www.uvnc.com/vista/

            http://www.codeproject.com/KB/vista-security/VistaSessionsC_.aspx

            Steps that wosks fine
            -------------------------------

            1. Get the Active Console SessionId using WTSGetActiveConsoleSessionId
            2. Since I need to launch the application under a system account, I use the token from Winlogon, since Winlogon runs under the system account. So I obtain the process ID of Winlogon and Duplicate the token.
            3. Then I make sure I sent the startupinfo parameter lpDesktop to winsta0\Default since I need to launch my process there.
            4. Then I use CreateProcessAsUser with Winlogon's duplicate token to launch my process into session 1.
            5. That's all. I am done.
            I got this working on Vista but I would like to launch a progrma to the WinSta0\\Winlogon desktop. Anyone have any ideas? When I change the desktop to WinSta0\\Winlogon the application does not appear on the logon screen. However, when I run the program on XP it works.

            Vista must have the Winlogon Desktop permissions set differently, I added "SeTcbPrivilege" but that did no good. Also, if I look at taskmgr I see the program started along with CreateProcessAsUser not returning any errors. It appears to work, just cannot see the application on the WinSta0\\Winlogon desktop. Anyone have any ideas?

             

            ==================================================================================================

            It works! with vista !!

            1. WTSGetActiveConsoleSessionId();
            2. WTSQueryUserToken() for winlogon.exe winlogon pid
            3. DuplicateTokenEx ()
            4. AdjustTokenPrivileges ()
            5. CreateProcessAsUser () lpDesktop to Winsta0\Winlogon

            Fire the executable via taskscheduler (schtasks.exe) with SYSTEM priveleges.


            Muhahahaha , and then if you dont see youre app in the winlogon desktop, try hitting ALT+TAB .... in the winlogon desktop.

            I hope microsoft keeps this entry point for showing things on the secure desktop, cause we use it to show the unattended installation progress, I think the secure desktop should stay accessible in future releases.

            (btw, I did not test it with FUS Fast User Switching, It worked with a domain account setting, this means Fast User Switching is not enabled).


            Much appreciated,

             mon11.

             

            ==================================================================================================

            Fast User Switching is enabled for domain accounts in Vista by default, so that's not necessarily true.

            ==================================================================================================

            AndyCadley,
            You are right, I tested it, it works also with FUS.

             

             其他連接:

            [1]  http://blogs.msdn.com/ntdebugging/archive/2007/01/04/desktop-heap-overview.aspx

            [2]  http://blogs.technet.com/askperf/archive/2007/07/24/sessions-desktops-and-windows-stations.aspx

            posted on 2008-06-28 08:22 free2000fly 閱讀(2242) 評論(0)  編輯 收藏 引用
            久久99精品免费一区二区| 久久精品一区二区三区不卡| 国产成人综合久久久久久| 91精品国产综合久久婷婷| 99久久精品免费国产大片| 伊人久久大香线蕉精品不卡| 色综合久久久久综合体桃花网| 99久久99久久久精品齐齐| 国产精品狼人久久久久影院| 伊人久久大香线蕉av不变影院| 久久精品国产亚洲av影院| 久久福利片| 精品久久久久久| 超级碰碰碰碰97久久久久| 日本久久久精品中文字幕| 久久精品国产久精国产一老狼| 欧美亚洲另类久久综合| 午夜欧美精品久久久久久久| 日日狠狠久久偷偷色综合96蜜桃| 色婷婷综合久久久久中文一区二区 | 亚洲第一永久AV网站久久精品男人的天堂AV | 亚洲成色WWW久久网站| 青青青国产精品国产精品久久久久| 伊人久久大香线蕉成人| 日韩欧美亚洲综合久久影院d3| 亚洲AV日韩AV永久无码久久| 亚洲午夜无码AV毛片久久| 久久精品国产福利国产琪琪| 久久青青草原精品影院| 精品久久久久久亚洲精品| 久久久久亚洲AV片无码下载蜜桃| 久久一区二区免费播放| 久久精品国产99久久久香蕉| 亚洲精品国产成人99久久| 精品久久久噜噜噜久久久 | 亚洲色欲久久久综合网| 午夜精品久久久久久影视777| 国产精品狼人久久久久影院| 曰曰摸天天摸人人看久久久| 久久线看观看精品香蕉国产| 精品久久久久久综合日本|