码迷,mamicode.com
首页 > 其他好文 > 详细

InstallShield打包问题

时间:2014-06-04 20:22:27      阅读:393      评论:0      收藏:0      [点我收藏+]

标签:des   c   style   class   blog   code   

在Project Assistant中按照步骤创建打包项目:

1、Application Information 中填写公司名称、产品名称、版本号、网址的信息。

  Application Information 左侧窗口点击 General Information 中设置其他信息,主要配置如下:

(1)General -> Setup Language:设置安装语言

(2)General -> INSTALLDIR:设置安装路径

(3)General -> Fast Install:根据需要配置以便加速安装速度

  a、No system restore point is saved for this installation:没有为这个程序保存系统恢复点

  b、Perform only File Costing and skip checking other costs:仅执行文件花费和跳过检查其他成本

  c、Reduce the frequency of progress messages:降低进度条信息的频率

(4)Summary Information Stream -> Require Administrative Privileges:设置管理员权限

  将该项设为“Yes”。这样设置之后,用户就可以有管理员的权限去安装该安装文件了,避免用户在安装的时候出现权限不够的问题。

(5)Add or Remove Programs -> Disable Change Button, Disable Remove Button, Disable Repair Button,这三个至少要有一个选为“NO”,全部设为“YES”的话,则在控制面板中,对应的软件没有“更改/删除”的按钮可以点击,即在这里就卸载不了软件了。

2、Installation Requirements:选择程序运行的操作系统及需要的软件

  可选的软件有Adobe Reader、.NET Framework、IE、Office等

3、Installation Architecture:可配置全部安装,或是部分安装

4、Application Files:添加要打包的文件

  Destination Computer:右键 Show Predefined Folder 可选择需要的文件夹,例如Font文件夹,将字体文件加入该文件夹,安装时会自动安装字体。

  添加完文件后,全选文件,右击,选中“Always Overwrite”。否则有时会出现重新安装后,有些文件没有被覆盖。(InstallShield Limited edition没有这项权限)

  添加完文件后,还需要添加C:\Windows\System32\msiexec.exe,用于添加卸载程序的快捷方式。

5、Application Shortcuts:创建桌面和开始菜单的快捷方式

  点击左侧的Shortcuts,可配置快捷方式的属性信息。  

  卸载程序的快捷方式设置参数以实现卸载功能:Behavior -> Argument 设置为“/x {Product Code}”

6、Application Registry:添加注册表

7、Installation Interview:配置安装界面

  Do you want to display a License Agreement Dialog:配置License界面

  Do you want to prompt users to enter their Company Name and User Name:配置是否展示输入公司名称和用户名称的界面

  Do you want your uses to be able to modify the installation location:配置用户是否可以修改安装路径

  Do you want users to be able to selectively install only certain parts:配置用户是否可以选择安装的模块

  Do you want to give users the option to launch your application when the installation:配置用户是否可以在安装结束后选择启动应用程序

  点击左侧的 Dialogs 可详细配置安装界面是否显示及具体内容。

8、将需要的其他工具一起打包到安装程序中:解决方案中 Specify Application Data -> Redistributables 可选择要打包的程序

9、设置安装程序的生成路径及方式:解决方案中 Prepare for Release -> Releases

  CD-ROM:可生成 msi、exe 安装包。

  SingleImage:只能生成 exe 安装包。

  CD-ROM 或 SingleImage 中选择 Setup.exe -> InstallShield Prerequisites Location,设置为 Extract From Setup.exe

  安装程序的生成路径为:\Express\CD_ROM\DiskImages\DISK1 或 \Express\SingleImage\DiskImages\DISK1

  可在VS上方的工具栏中选择生成方式。

 

打包过程中碰到的问题:

1、程序中有一个项目添加上后,打包就会失败,后检查发现是一个类中有一下未使用的代码,屏蔽后就解决了。原因未知。

bubuko.com,布布扣
[System.Runtime.InteropServices.DllImport("user32.dll ")]
static extern IntPtr GetWindowDC(IntPtr hWnd);

[System.Runtime.InteropServices.DllImport("user32.dll ")]
static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC);
bubuko.com,布布扣

2、使用快捷方式卸载软件时,提示“安装程序必须更新在系统运行时无法更新的文件或服务。如果选择继续,将需要重新启动以安装程序。”,点击“确定”后,机器未重启,软件成功卸载。原因未知。

3、打包时要关闭打包程序下的DiskImages文件夹,否则会导致生成失败。

 

InstallShield打包问题,布布扣,bubuko.com

InstallShield打包问题

标签:des   c   style   class   blog   code   

原文地址:http://www.cnblogs.com/hibernation/p/3759332.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!