• <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久久亚洲综合精品| 三级三级久久三级久久| 日韩精品无码久久一区二区三| 伊人久久成人成综合网222| 久久久久亚洲AV成人片| 亚洲午夜久久久精品影院| 久久精品无码一区二区三区免费 | 久久久亚洲AV波多野结衣| 伊人久久大香线蕉综合Av | 午夜精品久久久内射近拍高清| 精品久久亚洲中文无码| 国产精品青草久久久久福利99 | 久久国产精品77777| 亚洲&#228;v永久无码精品天堂久久| 亚洲国产成人久久综合区| 成人国内精品久久久久一区| 伊人久久大香线蕉无码麻豆| 久久夜色tv网站| 久久国产高潮流白浆免费观看| 久久这里都是精品| 99久久精品国产一区二区| .精品久久久麻豆国产精品| 久久精品国产99久久久古代 | 亚洲熟妇无码另类久久久| 久久精品国产99久久久香蕉| 久久久一本精品99久久精品88| 亚洲欧美一级久久精品| 久久久国产精华液| 国产L精品国产亚洲区久久| 精品久久久久久久| 99久久免费国产精品热| 无码伊人66久久大杳蕉网站谷歌| 亚洲欧美国产精品专区久久| 久久久久这里只有精品| 久久久国产精品| 思思久久99热免费精品6| 亚洲午夜福利精品久久| 国产精品久久久久久久人人看| 久久久久av无码免费网| 囯产精品久久久久久久久蜜桃|