• <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  評(píng)論-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 閱讀(2235) 評(píng)論(0)  編輯 收藏 引用

            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            四虎国产精品免费久久久| 九九久久精品国产| 无码国内精品久久人妻| 久久精品无码一区二区无码| 国产精品禁18久久久夂久| 亚洲国产精品久久久久| 久久精品无码一区二区日韩AV| 久久久艹| 91久久精品91久久性色| 亚洲伊人久久综合影院| 久久精品国产亚洲AV无码麻豆| 99精品伊人久久久大香线蕉| 香港aa三级久久三级老师2021国产三级精品三级在| 久久亚洲欧洲国产综合| 国产Av激情久久无码天堂| 久久99精品久久久久久水蜜桃 | 久久久久99精品成人片直播| 久久精品9988| 日日躁夜夜躁狠狠久久AV| 久久嫩草影院免费看夜色| 久久精品中文闷骚内射| 一本大道久久香蕉成人网| 久久精品国产精品亚洲精品| 久久夜色精品国产欧美乱| 久久国产精品一区| 久久精品国产91久久综合麻豆自制 | 久久久精品人妻一区二区三区蜜桃| 久久久久久噜噜精品免费直播| 国产精品久久成人影院| 久久国语露脸国产精品电影| 久久av免费天堂小草播放| 久久亚洲高清观看| 九九久久99综合一区二区| 久久久久久午夜成人影院| 久久综合狠狠综合久久| 亚洲中文久久精品无码ww16| 精品久久久久成人码免费动漫| 久久婷婷色香五月综合激情| 色悠久久久久久久综合网| 久久强奷乱码老熟女网站| 久久久久人妻一区精品果冻|