• <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)  編輯 收藏 引用
            国产精品久久久久蜜芽| 2021国产精品午夜久久| 亚洲日本久久久午夜精品| 久久99精品国产99久久6男男| 国产精品中文久久久久久久| 欧美麻豆久久久久久中文| 国产一级持黄大片99久久| 欧美一区二区三区久久综合 | 91精品国产综合久久四虎久久无码一级| 久久精品国产亚洲AV不卡| 99热精品久久只有精品| 狠色狠色狠狠色综合久久| 精品久久一区二区| 9191精品国产免费久久| 国产福利电影一区二区三区,免费久久久久久久精 | 99久久精品日本一区二区免费| 熟妇人妻久久中文字幕| 精品国产VA久久久久久久冰| 国产精品久久久久久福利69堂| 东京热TOKYO综合久久精品 | 人人妻久久人人澡人人爽人人精品| 亚洲国产婷婷香蕉久久久久久| 欧美日韩精品久久久久| 午夜欧美精品久久久久久久| 久久久久亚洲av无码专区导航 | 国内精品久久久久久99蜜桃| 2021少妇久久久久久久久久| 久久精品国产99国产电影网| 久久久国产一区二区三区| 日批日出水久久亚洲精品tv| 性高湖久久久久久久久| 伊人热人久久中文字幕| 久久强奷乱码老熟女网站| 一本久道久久综合狠狠爱| 久久青青草原国产精品免费| 亚洲Av无码国产情品久久| 色欲综合久久中文字幕网| 久久久久久久久久免免费精品| 精品国产乱码久久久久久人妻 | 久久夜色精品国产亚洲| 一97日本道伊人久久综合影院|