在规模比较大的网络环境里面,为了对服务器和客户机上的软件、系统补丁进行集中统一的管理,我们可能会用到SUS、WSUS、SMS等。SUS、WSUS管理系统更新,不在本文讨论,请参考其它相关技术文档。虽然SMS功能较强大,兼容性好,绝大多数应用软件都可以用它来管理,但是它比较复杂,实现起来要考虑的问题也比较多。如果要部署的应用程序不多不十分复杂的话,其实我们还是可以回归到比较原始的技术:
利用GPO实现软件设置
• 分发软件
• 修复软件
• 删除软件
• 升级软件
优点:易实现
缺点:功能简单、兼容性差(只能分发winodows安装程序包――.msi,exe封装的程序安装包要用Advanced Installer重新封装成msi文件)
实现:前提是熟悉Winodows Server活动目录的基本管理,理解组策略,熟悉通过AD部署组策略
一、获取要分发的软件
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
如图 从网上下载了 GreenBrowser 和千千静听来分发给所有客户机或者用户使用,但都是 exe 封装的安装包。因为通过组策略只能够分发 msi 封装的程序安装包,所以我们要使用 Advanced Installer 把他们都重新封装成 msi 格式的安装包:
1 、运行 Advanced Installer ,打开新建工程向导,按向导做
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
选择“语言”、“重新包装安装”―― > “确定”
2 、按向导提示,关掉真正运行的其它程序,下一步
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
3 、选中捕获新的安装
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
4 、指定要重新包装的源程序,并设置名称、版本等信息
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
5 、如图,选中新的系统捕获
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
6 、指定“安装捕获配置文件”保存路径,
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
其它默认
下一步,“确定”:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
7 、记录当前系统状态,以便后面记录安装源程序后系统的变化
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
8 、安装一遍源程序
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
9 、 Advanced Installer 会把源程序安装后系统的变化记下,“完成”,“导入”
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
10 、接下来设置重新封装后, msi 文件保存目录(这里指定的是
D:\MSI )和文件名,如图中 123 步骤
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0 resized="true">
过程:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
11 、完成,确定后
D:\MSI下就有重新包装后的msi安装包了,如下图
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
二、创建软件分发点(一共享文件夹)
1、如图,在用来存放分发软件的服务器上创建一共享文件夹
D:\software,域用户有读取的权限就够了
共享权限:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
NTFS权限:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
2 、在分发点用不同的子文件夹存放要分发的不同安装文件
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
3
、使用
管理安装选项命令
Msiexec
设置软件包在客户机安装的相关选项:
语法 msiexec /a
Package
参数 /a ( 或 -a) # 应用管理安装选项。
Package
# 指定 Windows 安装程序包文件的名称。 ( 本地路径 )
这个过程可以设置某些软件安装时需要的序列号等内容,这些设置项在客户机那边安装是就自动完成,不用再设了!
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
执行后会以向导的形式引导管理员安装,“网络位置”指到分发点下存放该软件的子文件夹,本例为
D:\software\GreenBrower\
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
其它的可以按默认的设置进行,
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
会把相关的文件装到
D:\software\GreenBrower\ 下,包括后面在 GPO 中新建分发程序包要指定的 msi 安装包
GreenBrowerGBSetup.msi,如下图
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
PS:其它要分发的软件同样安装上面的步骤管理安装包,如千千静听的分发点如下图所示:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
三、
设置
GPO
1、
打开
ADUC
――
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
(右击域intel.cn)打开域属性――新建GPO,并打开该GPO编辑器,如下图所示
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
2、
创建分发程序包的策略
分发方法有两种:
i.
指派(强制安装)
ii.
发布(可选安装)
修改后
GPO
后,如果是在“计算机配置”里“指派”给计算机,客户机执行策略刷新命令
gpupdate
后重启时安装,所有用户在客户机上都可使用该软件;如果是在“用户配置”里“指派”或者“发布”给用户,用户在客户机执行策略刷新命令
gpupdate
后生效,“发布”的可以在【控制面板】|【添加/删除程序】|“添加程序”中选择安装,“指派”的软件则注销或重启后重新登录后,程序在【开始】菜单中,用户第一次使用该软件时安装。
(
1
)、给用户分发,步骤如下:
A
、设置程序包位置(分发点共享文件夹):
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
用网络路径指定(下一步新建程序包时直接打开该路径)
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
B
、再右击“软件安装”,新建程序包:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
C
、用网络路径(客户机通过该路径找到
)指定要分发的软件包:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
D
、选定
msi
安装包:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
E、选择分发方式:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
F
、分发后的
GPO
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
(
2
)、给计算机分发,与(
1
)同理:
A
、只能做指派:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
B、指派后:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
四、客户机用户验证
1
、创建测试用户帐户:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
2、在XP系统客户机登录域:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
3、刷新组策略:
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
4
、打开“添加新程序”,可以看到通过
GPO
发布的程序
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0 resized="true">
5
、添加。安装成功、正常使用
~~~~~~~
四、
修复、删除、升级已分发的软件
如果上述内容已掌握,接下来的配置就比较简单了,不作详细介绍
0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>

0 && image.height>0){if(image.width>=700){this.width=700;this.height=image.height*700/image.width;}}" border=0>
1 、修复软件
v 当用户的软件发生文件丢失或损坏时,自动重新复制正确的文件来修复
v 如果原来软件分发点上的安装文件发生丢失或损坏
§ 在服务器上修复该软件的源文件
§ 重新部署一次
2 、 删除软件
v 【立即从用户和计算机卸载软件】:下一次用户登录或计算机启动时,软件会被强制删除
v 【允许用户继续使用软件,但禁止新的安装】:用户和计算机仍可继续执行使用软件,但不允许重新安装
3 、 升级软件
v 举例
§
Office2003升级到Office2007
§
Visio2003升级到visio2007
v 强制升级
§ 会强制用户将当前软件升级到新的版本
v 可选升级
§允许用户同时使用一个应用程序的两个版本