议程
                                                                                          WRP保护资源
                                                                                          WRP保护资源
             Windows 7兼容性系列课程(3):
                     7兼容性系列课程(3):                                                         程序兼容性助手
             有针对的兼容性开发(
             有针对的兼容性开发(上)                                                                 映射网络驱动器
                                                                                          安装识别
                                                                                          正确文件目录
                吴慧锋
                MVP 测试与技术支持工程师                                                            操作系统版本检测
                www.ssw.com.au                                                            Session 0
                E-mail / MSN: WilsonWu@ssw.com.au




          议程                                                                             Windows资源保护
                                                                                         Windows资源保护
                WRP保护资源
                WRP保护资源
                程序兼容性助手
                映射网络驱动器
                安装识别
                正确文件目录
                操作系统版本检测
                Session 0




          何为TrustedInstaller
          何为TrustedInstaller                                                             WRP 的保护内容
           c:Windows>icacls
           c:Windows>icacls explorer.exe
           explorer.exe NT SERVICETrustedInstaller:(F)
                           SERVICETrustedInstaller:(F)
                  BUILTIN
                  BUILTINAdministrators:(RX)
                  NT AUTHORITYSYSTEM:(RX)
                      AUTHORITY
                                                                                          大多核心操作系统文件
                  BUILTIN
                  BUILTINUsers:(RX)
           Successfully processed 1 files; Failed processing 0 files
                                                                                          大多核心操作系统的注册表项
           c:Windows>psgetsid
           c:Windows>psgetsid "NT SERVICETrustedInstaller"
                                     SERVICETrustedInstaller"                            操作系统进程级别的目录
           PsGetSid v1.43 - Translates SIDs to names and vice versa
           Copyright (C) 1999-2006 M k R
           C     i ht    1999-     Mark Russinovich
                                              i   i h                                     对于安装程式将没有限制
           Sysinternals - www.sysinternals.com
           SID for NT SERVICETrustedInstaller:
                      SERVICETrustedInstaller:
           S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464
                 80-956008885-3418522649-1831038044-1853292631-
                                                                                          取决于服务的SID
                                                                                          取决于服务的SID
                                                                                           TrustedInstaller是服务而不是账户!
                                                                                           TrustedInstaller是服务而不是账户!
           c:
           c:Windows>sc showsid trustedinstaller
           NAME: trustedinstaller
           SERVICE SID: S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464
                               80-956008885-3418522649-1831038044-1853292631-
           c:
           c:Windows>sc getdisplayname trustedinstaller
           [SC] GetServiceDisplayName SUCCESS
           Name = Windows Modules Installer




© 2002 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.   1
议程
                                                                              WRP保护资源
                                                                              WRP保护资源

          Windows资源保护
          Windows资源保护                                                         程序兼容性助手
                                                                              映射网络驱动器
                                                                              安装识别
                                                                              正确文件目录
                                                                              操作系统版本检测
                                                                              Session 0




          程序兼容性助手
          程序兼容性助手                                                         PCA安装失败
                                                                          PCA安装失败
              只适用于客户端应用程序
              仅当运行失败时触发
              PCA在如下情况被触发:
              PCA在如下情况被触发:
                 在“Program Files”目录下创建 个子目录
                           Files 目录下创建一个子目录
                   Program Files”目录下创建一个子目录
                 将文件复制到新目录中
                 利用虚拟化事件




                                                                          议程
                                                                              WRP保护资源
                                                                              WRP保护资源

          程序兼容性助手                                                             程序兼容性助手
                                                                              映射网络驱动器
                                                                              正确文件目录
                                                                              操作系统版本检测
                                                                              Session 0




© 2002 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.   2
映射网络驱动器
           射网络驱动器
              在每个用户登录会话中单独存放
              管理员权限用户登录具有两个会话
                 未提升权限的会话
                                                                          驱动器映射与UAC
                                                                          驱动器映射与UAC
                 提升权限的会话
              管理员权限用户具有两个驱动器映射集
              HKLMSOFTWAREMicrosoftWindows
              HKLMSOFTWAREMicrosoftWindows
              CurrentVersionPoliciesSystem
              CurrentVersionPoliciesSystem
              EnableLinkedConnections = (dword)1
                                          (dword)1
              http://support.microsoft.com/kb/937624




          议程                                                              安装识别
              WRP保护资源
              WRP保护资源                                                         为什么我的程序会以提升权限被运行
              程序兼容性助手                                                           因为Windows
                                                                                因为Windows 7认为它是一个安装包

              映射网络驱动器                                                         具体的安装包
              安装识别                                                            通用的安装包
              正确文件目录                                                          具体的非安装包
              操作系统版本检测
              Session 0




                                                                          议程
                                                                              WRP保护资源
                                                                              WRP保护资源

          安装识别                                                                程序兼容性助手
                                                                              映射网络驱动器
                                                                              安装识别
                                                                              正确文件目录
                                                                              操作系统版本检测
                                                                              Session 0




© 2002 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.   3
正确文件目录
          正确文件目录 (1/2)                                                                                      正确文件目录
                                                                                                            正确文件目录 (2/2)
          以前的路径                                         新路径                                                 以前的路径                                     新路径

          c:windows                                     %windir%
                                                         windir%                                            %windir%profiles%username%start menu
                                                                                                             windir% profiles%username%             %userstartmenu%
                                                                                                                                                       userstartmenu%

          %windir%rundll32.exe
           windir%                                      %systemdir%rundll32.exe
                                                         systemdir%                                         %windir%profiles%username%desktop
                                                                                                             windir% profiles%username%             %userdesktop%
                                                                                                                                                       userdesktop%

          %windir%rundll.exe
           windir%                                      %systemdir%rundll32.exe
                                                         systemdir%                                         %windir%profiles%username%favorites
                                                                                                             windir% profiles%username%             %userfavorites%
                                                                                                                                                       userfavorites%

          %windir%write.exe
           windir%                                      %systemdir%write.exe
                                                         systemdir%                                         %windir%profilesall usersstart menu
                                                                                                             windir% profiles users
                                                                                                                     p                                %allstartmenu%
                                                                                                                                                       allstartmenu%

          %windir%wordpad.exe
           windir%                                      %programfiles%windows ntaccessorieswordpad.exe
                                                         programfiles%         ntaccessories              %windir%profilesall usersdesktop
                                                                                                             windir% profiles users                 %alldesktop

          %programfiles%accessorieswordpad.exe
           programfiles% accessories                   %programfiles%windows ntaccessorieswordpad.exe
                                                         programfiles%         ntaccessories              %windir%profilesall usersfavorites
                                                                                                             windir% profiles users                 %userfavorites%
                                                                                                                                                       userfavorites%

          %windir%dxdiag.exe
           windir%                                      %systemdir%dxdiag.exe
                                                         systemdir%                                         ddhelp.exe                                ddraw.dll

          %windir%start menu
           windir%                                      %userstartmenu%
                                                         userstartmenu%                                     ddraw16.dll                               ddraw.dll

          %windir%desktop
           windir%                                      %userdesktop%
                                                         userdesktop%                                       dsound.vxd                                Ddraw.dll

          %windir%
          %windir%favorites                            %userfavorites%
                                                         userfavorites%                                     %userstartmenu%
                                                                                                             userstartmenu%                           %allstartmenu%
                                                                                                                                                       allstartmenu%




                                                                                                            议程
                                                                                                                   WRP保护资源
                                                                                                                   WRP保护资源

          正确文件目录                                                                                                   程序兼容性助手
                                                                                                                   映射网络驱动器
                                                                                                                   安装识别
                                                                                                                   正确文件目录
                                                                                                                   操作系统版本检测
                                                                                                                   Session 0




          Windows版本纵览
          Windows版本纵览                                                                                       版本检测的最佳实践
          操作系统                              版本                            发布时间
                                                                                                                   不要使用横等方式检测版本
          Windows 1.0                       1.04                          1985
          Windows 2.0                       2.11                          1987                                            如果你的程序需要某项新功能则请直接价差该功能是
          Windows 3.0                       3.00                          1990                                            否存在
          Windows NT 3.1                    3.10.528                      1993                                            使用大于好来检测系统版本
          Windows for Workgroups 3.11       3.11                          1993
                                                                                                                               检查Windows XP或后续系统 (
                                                                                                                               检查Windows XP或后续系统 (>= 5.1)
                                                                                                                                                        )
          Windows NT Workstation 3.5        3.5.807                       1994
          Windows NT Workstation 3.51       3.51.1057                     1995                                            特殊的情况是一些商业或法律原因需要做一个版本检
          Windows 95                        4.0.950                       1995                                            查,比如一个管理机构,您需要证明您的应用程序的
          Windows NT Workstation 4.0        4.0.1381                      1996                                            每个操作系统和版本
          Windows 98                        4.1.1998                      1998
          Windows 98 Second Edition         4.1.2222                      1999
          Windows Me                        4.90.3000                     2000
          Windows 2000 Professional         5.0.2195                      2000
          Windows XP                        5.1.2600                      2001
          Windows Vista                     6.0.6000                      2006
          Windows 7                         6.1.????                      ????




© 2002 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.                                               4
议程
                                                                              WRP保护资源
                                                                              WRP保护资源

          操作系统版本检测                                                            程序兼容性助手
                                                                              映射网络驱动器
                                                                              安装识别
                                                                              正确文件目录
                                                                              操作系统版本检测
                                                                              Session 0




          Session 0分离原理
                  0分离原理                                                   Session 0分离原理
                                                                                  0分离原理

                Session 0                                                       Session 0                    Session 1
                     WinSta0                                                        WinSta0                       WinSta0


                 Default Desktop
                 D f lt D kt                                                     Default Desktop
                                                                                 D f lt D kt                  Default Desktop
                                                                                                              D f lt D kt


                     Service                                                         Service                  User Application




                 User Application




          Session 0兼容问题
                  0兼容问题                                                   Service设计的最佳实践
                                                                          Service设计的最佳实践
              支持远程桌面和快速切换用户的程序都没                                              使用第二个程序来显示UI
                                                                              使用第二个程序来显示UI
              有问题                                                             使用C/S结构进行交互
                                                                              使用C/S结构进行交互
              通过Windows Messages进行交互
              通过Windows Messages进行交互                                            RPC
              本地命名空间实体                                                          命名管道

              UI界面和服务
              UI界面和服务                                                         尽可能使用Service
                                                                              尽可能使用Service Hardening
                                                                                删除不必要的权限
              与Session 0桌面进行交互                                                  使用服务的SID来安全访问资源
                                                                                使用服务的SID来安全访问资源
                 UX变化巨大
                 UX变化巨大
                                                                              快速解决方案:
                                                                                WTSSendMessage




© 2002 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.        5
Question & Answer                                               感谢!
                                                                          感谢!
                                                                              吴慧锋
                   如需提出问题,请在此区域输入文字,并单击
                   “问题和解答”右上方的“提问”按钮即可。
                    问题和解答”右上方的“提问”                                            Wilson Wu
                                                                              Email: iwilsonwu@gmail.com
                                                                              MSN: il
                                                                              MSN wilsonwu@ssw.com.au
                                                                                             @
                                                                              QQ: 53286461
                                                                              Blog: http://WilsonWu.cnblogs.com
                                                                              Blog: http://WilsonWu.cnblogs.com
             您也可以选择在微软中文技术论坛上寻求帮助,MSDN中文网络
               也可以选择在微软中文技术论坛上寻求帮助,MSDN中文网络
             广播的讲师们会定期在论坛上为大家解答与课程相关的技术问题。
             http://forums.microsoft.com/china
             http://forums.microsoft.com/china




© 2002 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.   6

More Related Content

PDF
Windows 7兼容性系列课程(2):Windows 7用户权限控制 (UAC)
PDF
Shibuya.abc - Gnashで遊ぼう
PDF
Windows 7兼容性系列课程(1):Windows 7兼容性概述
PDF
企业级搜索引擎Solr交流
PDF
Windows 7兼容性系列课程(5):Windows 7徽标认证
PDF
PDF
IE-008 Ie的機會與挑戰 以Ic晶圓製造業為例
PDF
095722121-期中報告-UGC
Windows 7兼容性系列课程(2):Windows 7用户权限控制 (UAC)
Shibuya.abc - Gnashで遊ぼう
Windows 7兼容性系列课程(1):Windows 7兼容性概述
企业级搜索引擎Solr交流
Windows 7兼容性系列课程(5):Windows 7徽标认证
IE-008 Ie的機會與挑戰 以Ic晶圓製造業為例
095722121-期中報告-UGC

What's hot (20)

PDF
Windows 7兼容性系列课程(4):有针对的兼容性开发(下)
PDF
كتاب تعليم الفلاش
PDF
IPV9人类共同的理想/IPv9 - The common ideal for human being
PDF
20090418 イケテルRails勉強会 第2部Air編
PDF
Richard Databoard
PDF
خودکاوی-اریک.فروم
PDF
maple , part2
PDF
Zurich2007 MySQL Query Optimization
PDF
PDF
4200 Kte7.0 Training V1.0
PDF
【12-B-4】 並列処理開発を支援するコンパイラの機能
PDF
PDF
Jslunch6
PDF
20090418 イケテルRails勉強会 第2部Air編 解説
PDF
Oracle Unconference 松下 4/22
PDF
Semantic Web Vo Camp Seoul Summer Rdf Vocabularies
PDF
داستانهايي از امام زمان3
PDF
العلوم للصف الرابع
PDF
Prototyping Web Metaphors 20090418
PDF
The Invisible Web
Windows 7兼容性系列课程(4):有针对的兼容性开发(下)
كتاب تعليم الفلاش
IPV9人类共同的理想/IPv9 - The common ideal for human being
20090418 イケテルRails勉強会 第2部Air編
Richard Databoard
خودکاوی-اریک.فروم
maple , part2
Zurich2007 MySQL Query Optimization
4200 Kte7.0 Training V1.0
【12-B-4】 並列処理開発を支援するコンパイラの機能
Jslunch6
20090418 イケテルRails勉強会 第2部Air編 解説
Oracle Unconference 松下 4/22
Semantic Web Vo Camp Seoul Summer Rdf Vocabularies
داستانهايي از امام زمان3
العلوم للصف الرابع
Prototyping Web Metaphors 20090418
The Invisible Web
Ad

Viewers also liked (8)

PPS
看病的方法
PPS
從衛星看地球奇景
PPT
如何正確吃水果
PPS
你今天的選擇是什麼?
DOC
電視上看不到的奧運開幕畫面
PPS
柬埔寨鄉村婚禮
DOC
我的學思歷程 劉兆玄
ODP
Pythonpresent
看病的方法
從衛星看地球奇景
如何正確吃水果
你今天的選擇是什麼?
電視上看不到的奧運開幕畫面
柬埔寨鄉村婚禮
我的學思歷程 劉兆玄
Pythonpresent
Ad

Similar to Windows 7兼容性系列课程(3):有针对的兼容性开发(上) (20)

PDF
What Can Compilers Do for Us?
PDF
20070920173805
PPTX
Fy09 Q3行動咖啡館 微軟虛擬化解決方案
PDF
XS Japan 2008 Citrix Japanese
PPTX
微软客户端技术纵览
PDF
【12-D-6】 Silverlight によるハイグレードなLOB/BI実現のためのコンポーネント活用法
PDF
Testing at the core of digital optimization
PDF
Webken 03: Project Design for Optimaizing User Experience
PDF
080620 Identity Conference #2 hiroki
PDF
Ontology-based Content Management System (ICIM 2008)
PDF
اف تي بي
PDF
اف تي بي
PPTX
Development toolsforteamdevelopment
PDF
テキストマイニングとNLPビジネス
PDF
Linuxユーザーのための Windows 管理入門
PDF
CEO-048-階段關卡流程法
PDF
QM-078-企業導入六標準差之個案探討
PDF
P2P Bug Tracking with SD
PDF
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
PDF
20090323 Phpstudy
What Can Compilers Do for Us?
20070920173805
Fy09 Q3行動咖啡館 微軟虛擬化解決方案
XS Japan 2008 Citrix Japanese
微软客户端技术纵览
【12-D-6】 Silverlight によるハイグレードなLOB/BI実現のためのコンポーネント活用法
Testing at the core of digital optimization
Webken 03: Project Design for Optimaizing User Experience
080620 Identity Conference #2 hiroki
Ontology-based Content Management System (ICIM 2008)
اف تي بي
اف تي بي
Development toolsforteamdevelopment
テキストマイニングとNLPビジネス
Linuxユーザーのための Windows 管理入門
CEO-048-階段關卡流程法
QM-078-企業導入六標準差之個案探討
P2P Bug Tracking with SD
【13-C-4】 「もう業務はとまらない!オフライン機能を使った業務アプリケーションの実例と最新 Curl 情報」
20090323 Phpstudy

More from Chui-Wen Chiu (20)

ODP
Dynamic Python
ODP
Introduce Django
PDF
移動內存算法
PPT
墾丁 更新版
PPT
墾丁 更新版2
PDF
PPT
高雄新地標 統一夢世代
PDF
Borland傳奇
PDF
Python 庫簡介
PDF
Asp.Net Mvc 1.0
PDF
天下第一 夜市總冠軍
PPT
下班就跑是富有哲學道理1
PDF
認識腸病毒
PDF
排隊的店
PPS
新 創 意
PPT
挖好屬於自己的井
PPS
Why The Us Wants War 080702
PPT
Unknown Parameter Value
PPS
你也在井裡嗎
PPT
世界是平的
Dynamic Python
Introduce Django
移動內存算法
墾丁 更新版
墾丁 更新版2
高雄新地標 統一夢世代
Borland傳奇
Python 庫簡介
Asp.Net Mvc 1.0
天下第一 夜市總冠軍
下班就跑是富有哲學道理1
認識腸病毒
排隊的店
新 創 意
挖好屬於自己的井
Why The Us Wants War 080702
Unknown Parameter Value
你也在井裡嗎
世界是平的

Recently uploaded (20)

PDF
Consumable AI The What, Why & How for Small Teams.pdf
PPTX
The various Industrial Revolutions .pptx
PPTX
Benefits of Physical activity for teenagers.pptx
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Five Habits of High-Impact Board Members
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Getting started with AI Agents and Multi-Agent Systems
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPT
Geologic Time for studying geology for geologist
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
Final SEM Unit 1 for mit wpu at pune .pptx
Consumable AI The What, Why & How for Small Teams.pdf
The various Industrial Revolutions .pptx
Benefits of Physical activity for teenagers.pptx
Custom Battery Pack Design Considerations for Performance and Safety
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Developing a website for English-speaking practice to English as a foreign la...
Five Habits of High-Impact Board Members
Improvisation in detection of pomegranate leaf disease using transfer learni...
Chapter 5: Probability Theory and Statistics
Getting started with AI Agents and Multi-Agent Systems
Microsoft Excel 365/2024 Beginner's training
A proposed approach for plagiarism detection in Myanmar Unicode text
Geologic Time for studying geology for geologist
A contest of sentiment analysis: k-nearest neighbor versus neural network
Build Your First AI Agent with UiPath.pptx
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
OpenACC and Open Hackathons Monthly Highlights July 2025
Final SEM Unit 1 for mit wpu at pune .pptx

Windows 7兼容性系列课程(3):有针对的兼容性开发(上)

  • 1. 议程 WRP保护资源 WRP保护资源 Windows 7兼容性系列课程(3): 7兼容性系列课程(3): 程序兼容性助手 有针对的兼容性开发( 有针对的兼容性开发(上) 映射网络驱动器 安装识别 正确文件目录 吴慧锋 MVP 测试与技术支持工程师 操作系统版本检测 www.ssw.com.au Session 0 E-mail / MSN: WilsonWu@ssw.com.au 议程 Windows资源保护 Windows资源保护 WRP保护资源 WRP保护资源 程序兼容性助手 映射网络驱动器 安装识别 正确文件目录 操作系统版本检测 Session 0 何为TrustedInstaller 何为TrustedInstaller WRP 的保护内容 c:Windows>icacls c:Windows>icacls explorer.exe explorer.exe NT SERVICETrustedInstaller:(F) SERVICETrustedInstaller:(F) BUILTIN BUILTINAdministrators:(RX) NT AUTHORITYSYSTEM:(RX) AUTHORITY 大多核心操作系统文件 BUILTIN BUILTINUsers:(RX) Successfully processed 1 files; Failed processing 0 files 大多核心操作系统的注册表项 c:Windows>psgetsid c:Windows>psgetsid "NT SERVICETrustedInstaller" SERVICETrustedInstaller" 操作系统进程级别的目录 PsGetSid v1.43 - Translates SIDs to names and vice versa Copyright (C) 1999-2006 M k R C i ht 1999- Mark Russinovich i i h 对于安装程式将没有限制 Sysinternals - www.sysinternals.com SID for NT SERVICETrustedInstaller: SERVICETrustedInstaller: S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 80-956008885-3418522649-1831038044-1853292631- 取决于服务的SID 取决于服务的SID TrustedInstaller是服务而不是账户! TrustedInstaller是服务而不是账户! c: c:Windows>sc showsid trustedinstaller NAME: trustedinstaller SERVICE SID: S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 80-956008885-3418522649-1831038044-1853292631- c: c:Windows>sc getdisplayname trustedinstaller [SC] GetServiceDisplayName SUCCESS Name = Windows Modules Installer © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 1
  • 2. 议程 WRP保护资源 WRP保护资源 Windows资源保护 Windows资源保护 程序兼容性助手 映射网络驱动器 安装识别 正确文件目录 操作系统版本检测 Session 0 程序兼容性助手 程序兼容性助手 PCA安装失败 PCA安装失败 只适用于客户端应用程序 仅当运行失败时触发 PCA在如下情况被触发: PCA在如下情况被触发: 在“Program Files”目录下创建 个子目录 Files 目录下创建一个子目录 Program Files”目录下创建一个子目录 将文件复制到新目录中 利用虚拟化事件 议程 WRP保护资源 WRP保护资源 程序兼容性助手 程序兼容性助手 映射网络驱动器 正确文件目录 操作系统版本检测 Session 0 © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 2
  • 3. 映射网络驱动器 射网络驱动器 在每个用户登录会话中单独存放 管理员权限用户登录具有两个会话 未提升权限的会话 驱动器映射与UAC 驱动器映射与UAC 提升权限的会话 管理员权限用户具有两个驱动器映射集 HKLMSOFTWAREMicrosoftWindows HKLMSOFTWAREMicrosoftWindows CurrentVersionPoliciesSystem CurrentVersionPoliciesSystem EnableLinkedConnections = (dword)1 (dword)1 http://support.microsoft.com/kb/937624 议程 安装识别 WRP保护资源 WRP保护资源 为什么我的程序会以提升权限被运行 程序兼容性助手 因为Windows 因为Windows 7认为它是一个安装包 映射网络驱动器 具体的安装包 安装识别 通用的安装包 正确文件目录 具体的非安装包 操作系统版本检测 Session 0 议程 WRP保护资源 WRP保护资源 安装识别 程序兼容性助手 映射网络驱动器 安装识别 正确文件目录 操作系统版本检测 Session 0 © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 3
  • 4. 正确文件目录 正确文件目录 (1/2) 正确文件目录 正确文件目录 (2/2) 以前的路径 新路径 以前的路径 新路径 c:windows %windir% windir% %windir%profiles%username%start menu windir% profiles%username% %userstartmenu% userstartmenu% %windir%rundll32.exe windir% %systemdir%rundll32.exe systemdir% %windir%profiles%username%desktop windir% profiles%username% %userdesktop% userdesktop% %windir%rundll.exe windir% %systemdir%rundll32.exe systemdir% %windir%profiles%username%favorites windir% profiles%username% %userfavorites% userfavorites% %windir%write.exe windir% %systemdir%write.exe systemdir% %windir%profilesall usersstart menu windir% profiles users p %allstartmenu% allstartmenu% %windir%wordpad.exe windir% %programfiles%windows ntaccessorieswordpad.exe programfiles% ntaccessories %windir%profilesall usersdesktop windir% profiles users %alldesktop %programfiles%accessorieswordpad.exe programfiles% accessories %programfiles%windows ntaccessorieswordpad.exe programfiles% ntaccessories %windir%profilesall usersfavorites windir% profiles users %userfavorites% userfavorites% %windir%dxdiag.exe windir% %systemdir%dxdiag.exe systemdir% ddhelp.exe ddraw.dll %windir%start menu windir% %userstartmenu% userstartmenu% ddraw16.dll ddraw.dll %windir%desktop windir% %userdesktop% userdesktop% dsound.vxd Ddraw.dll %windir% %windir%favorites %userfavorites% userfavorites% %userstartmenu% userstartmenu% %allstartmenu% allstartmenu% 议程 WRP保护资源 WRP保护资源 正确文件目录 程序兼容性助手 映射网络驱动器 安装识别 正确文件目录 操作系统版本检测 Session 0 Windows版本纵览 Windows版本纵览 版本检测的最佳实践 操作系统 版本 发布时间 不要使用横等方式检测版本 Windows 1.0 1.04 1985 Windows 2.0 2.11 1987 如果你的程序需要某项新功能则请直接价差该功能是 Windows 3.0 3.00 1990 否存在 Windows NT 3.1 3.10.528 1993 使用大于好来检测系统版本 Windows for Workgroups 3.11 3.11 1993 检查Windows XP或后续系统 ( 检查Windows XP或后续系统 (>= 5.1) ) Windows NT Workstation 3.5 3.5.807 1994 Windows NT Workstation 3.51 3.51.1057 1995 特殊的情况是一些商业或法律原因需要做一个版本检 Windows 95 4.0.950 1995 查,比如一个管理机构,您需要证明您的应用程序的 Windows NT Workstation 4.0 4.0.1381 1996 每个操作系统和版本 Windows 98 4.1.1998 1998 Windows 98 Second Edition 4.1.2222 1999 Windows Me 4.90.3000 2000 Windows 2000 Professional 5.0.2195 2000 Windows XP 5.1.2600 2001 Windows Vista 6.0.6000 2006 Windows 7 6.1.???? ???? © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 4
  • 5. 议程 WRP保护资源 WRP保护资源 操作系统版本检测 程序兼容性助手 映射网络驱动器 安装识别 正确文件目录 操作系统版本检测 Session 0 Session 0分离原理 0分离原理 Session 0分离原理 0分离原理 Session 0 Session 0 Session 1 WinSta0 WinSta0 WinSta0 Default Desktop D f lt D kt Default Desktop D f lt D kt Default Desktop D f lt D kt Service Service User Application User Application Session 0兼容问题 0兼容问题 Service设计的最佳实践 Service设计的最佳实践 支持远程桌面和快速切换用户的程序都没 使用第二个程序来显示UI 使用第二个程序来显示UI 有问题 使用C/S结构进行交互 使用C/S结构进行交互 通过Windows Messages进行交互 通过Windows Messages进行交互 RPC 本地命名空间实体 命名管道 UI界面和服务 UI界面和服务 尽可能使用Service 尽可能使用Service Hardening 删除不必要的权限 与Session 0桌面进行交互 使用服务的SID来安全访问资源 使用服务的SID来安全访问资源 UX变化巨大 UX变化巨大 快速解决方案: WTSSendMessage © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 5
  • 6. Question & Answer 感谢! 感谢! 吴慧锋 如需提出问题,请在此区域输入文字,并单击 “问题和解答”右上方的“提问”按钮即可。 问题和解答”右上方的“提问” Wilson Wu Email: iwilsonwu@gmail.com MSN: il MSN wilsonwu@ssw.com.au @ QQ: 53286461 Blog: http://WilsonWu.cnblogs.com Blog: http://WilsonWu.cnblogs.com 您也可以选择在微软中文技术论坛上寻求帮助,MSDN中文网络 也可以选择在微软中文技术论坛上寻求帮助,MSDN中文网络 广播的讲师们会定期在论坛上为大家解答与课程相关的技术问题。 http://forums.microsoft.com/china http://forums.microsoft.com/china © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 6