installshield 11.5 如何实现安装的时候写日志?是我来自己写日志(写进LOG.TXT)而不是系统自动写日志.比如在安装某个组件前我写"开始安装组建1",组建安装成功后"组件1安装成功" 怎么实现呢?使用installscript ??? http://support.installshield.com/kb/view.asp?articleid=q104807
这里是系统写日志的.没分了...

解决方案 »

  1.   

    要实现自己写日志的话,的确是可以通过脚本来实现的。在脚本中通过LogWriteCustomString( szKey, szValue )将信息写道日志文件中,但这样一来的话也必须通过脚本来安装组件,个人认为这是一种比较麻烦的做法。另外由安装程序自动生成的日志应该是包括对安装组件的记录的。
      

  2.   

    CSDN不可以倒分的,他以为你倒分了......
      

  3.   


    系统日志发生错误的时候却没有提示信息.我测试过了.
    ------------
    Windows (R) Installer. V 3.01.4000.1823 msiexec /Option <Required Parameter> [Optional Parameter]安装选项
    </package | /i> <Product.msi>
    安装或配置产品
    /a <Product.msi>
    管理安装 - 在网络上安装产品
    /j<u|m> <Product.msi> [/t <Transform List>] [/g <Language ID>]
    播发产品 - m 播发到所有用户,u 播发到当前用户
    </uninstall | /x> <Product.msi | ProductCode>
    卸载产品
    显示选项
    /quiet
    安静模式,无用户交互
    /passive
    无从参与模式 - 只显示进程栏
    /q[n|b|r|f]
    设置用户界面级别
    n - 无用户界面
    b - 基本界面
    r - 精简界面
    f - 完整界面(默认值)
    /help
    帮助信息
    重新启动选项
    /norestart
    安装完成后不重新启动
    /promptrestart
    提示用户重新启动(如果必要)
    /forcerestart
    安装后总是重新启动计算机
    日志选项
    /l[i|w|e|a|r|u|c|m|o|p|v|x|+|!|*] <LogFile>
    i - 状态消息
    w - 非致命警告
    e - 全部错误消息
    a - 操作的启动
    r - 操作特定记录
    u - 用户请求
    c - 初始界面参数
    m - 内存不足或致命退出信息
    o - 磁盘空间不足消息
    p - 终端属性
    v - 详细输出
    x - 额外调试信息
    + - 扩展到现有日志文件
    ! - 每一行刷新到日志
    * - 记录所有信息,除了 v 和 x 选项
    /log <LogFile>
    与 /l* <LogFile> 相同
    更新选项
    /update <Update1.msp>[;Update2.msp]
    应用更新
    /uninstall <PatchCodeGuid>[;Update2.msp] /package <Product.msi | ProductCode>
    删除产品的更新
    修复选项
    /f[p|e|c|m|s|o|d|a|u|v] <Product.msi | ProductCode>
    修复产品
    p - 仅当文件丢失时
    o - 如果文件丢失或安装了更旧的版本(默认值)
    e - 如果文件丢失或安装了相同或更旧的版本
    d - 如果文件丢失或安装了不同版本
    c - 如果文件丢失或较验和与计算的值不匹配
    a - 强制重新安装所有文件
    u - 所有必要的用户特定注册表项(默认值)
    m - 所有必要的计算机特定注册表项(默认值)
    s - 所有现有的快键方式(默认值)
    v - 从源运行并缓存本地数据包
    设置公共属性
    [PROPERTY=PropertyValue]请查阅 Windows (R) Installer SDK 获得有关
    命令行语法的其他文档。版权所有 (C) Microsoft Corporation. 保留所有权利。
    此软件的部分内容系基于 Independent JPEG Group 的工作。
      

  4.   

    === Logging started: 2006-6-10  17:05:38 ===
    Action 17:05:38: INSTALL. 
    Action start 17:05:38: INSTALL.
    Action 17:05:38: ISMsiServerStartup. 
    Action start 17:05:38: ISMsiServerStartup.
    Action ended 17:05:38: ISMsiServerStartup. Return value 1.
    Action 17:05:38: ISStartup. 
    Action start 17:05:38: ISStartup.
    1: The InstallScript engine version currently installed on this machine is adequate. 
    1: Event 'E538703' is created 
    1: GetInstallDriver, Can not find InstallDriver in ROT table, Return Code = 0x80004005 
    1: {8290D99F-06AC-44F9-A69D-D227C28142D8} 
    1: Extract supporting files 
    1: Failed to extract _IsUser.dll, Ignore it. 
    1: Failed to extract IGdi.dll, Ignore it. 
    1: Ev1965468 
    Action ended 17:05:39: ISStartup. Return value 1.
    Action 17:05:39: AppSearch. Searching for installed applications
    Action start 17:05:39: AppSearch.
    Action ended 17:05:39: AppSearch. Return value 1.
    Action 17:05:39: LaunchConditions. Evaluating launch conditions
    Action start 17:05:39: LaunchConditions.
    Action ended 17:05:39: LaunchConditions. Return value 1.
    Action 17:05:39: SetupInitialization. 
    Action start 17:05:39: SetupInitialization.
    Info 2898.Tahoma8, Tahoma, 0
    Info 2898.TahomaBold10, Tahoma, 0
    Action 17:05:39: SetupInitialization. Dialog created
    Action ended 17:05:39: SetupInitialization. Return value 1.
    Action 17:05:39: FindRelatedProducts. Searching for related applications
    Action start 17:05:39: FindRelatedProducts.
    Action ended 17:05:39: FindRelatedProducts. Return value 1.
    Action 17:05:39: ValidateProductID. 
    Action start 17:05:39: ValidateProductID.
    Action ended 17:05:39: ValidateProductID. Return value 1.
    Action 17:05:39: CostInitialize. Computing space requirements
    Action start 17:05:39: CostInitialize.
    Action ended 17:05:39: CostInitialize. Return value 1.
    Action 17:05:39: FileCost. Computing space requirements
    Action start 17:05:39: FileCost.
    Action ended 17:05:39: FileCost. Return value 1.
    Action 17:05:39: IsolateComponents. 
    Action start 17:05:39: IsolateComponents.
    Action ended 17:05:39: IsolateComponents. Return value 1.
    Action 17:05:39: setUserProfileNT. 
    Action start 17:05:39: setUserProfileNT.
    Action ended 17:05:39: setUserProfileNT. Return value 1.
    Action 17:05:39: setAllUsersProfile2K. 
    Action start 17:05:39: setAllUsersProfile2K.
    Action ended 17:05:39: setAllUsersProfile2K. Return value 1.
    Action 17:05:39: ResolveSource. 
    Action start 17:05:39: ResolveSource.
    Action ended 17:05:39: ResolveSource. Return value 1.
    Action 17:05:39: CostFinalize. Computing space requirements
    Action start 17:05:39: CostFinalize.
    Action ended 17:05:39: CostFinalize. Return value 1.
    Action 17:05:39: MigrateFeatureStates. Migrating feature states from related applications
    Action start 17:05:39: MigrateFeatureStates.
    Action ended 17:05:39: MigrateFeatureStates. Return value 0.
    Action 17:05:39: InstallWelcome. 
    Action start 17:05:39: InstallWelcome.
    Action 17:05:39: InstallWelcome. Dialog created
    Info 2898.MSSansBold8, Tahoma, 0
    DEBUG: Error 2888:  Executing the Binary view failed
    Internal Error 2888. Binary
    Info 2898.MSSWhiteSerif8, Tahoma, 0
    Action 17:05:40: LicenseAgreement. Dialog created
    DEBUG: Error 2888:  Executing the Binary view failed
    Internal Error 2888. Binary
    Action 17:05:43: DestinationFolder. Dialog created
    DEBUG: Error 2888:  Executing the Binary view failed
    Internal Error 2888. Binary
    Action 17:05:43: ReadyToInstall. Dialog created
    Action ended 17:05:44: InstallWelcome. Return value 1.
    Action 17:05:44: SetupProgress. 
    Action start 17:05:44: SetupProgress.
    DEBUG: Error 2888:  Executing the Binary view failed
    Internal Error 2888. Binary
    Action 17:05:44: SetupProgress. Dialog created
    Action ended 17:05:44: SetupProgress. Return value 1.
    Action 17:05:44: ExecuteAction. 
    Action start 17:05:44: ExecuteAction.
    Action 17:05:44: INSTALL. 
    Action start 17:05:44: INSTALL.
    Action 17:05:44: ISMsiServerStartup. 
    Action start 17:05:44: ISMsiServerStartup.
    Action ended 17:05:44: ISMsiServerStartup. Return value 1.
    Action 17:05:44: ISStartup. 
    Action start 17:05:44: ISStartup.
    1: The InstallScript engine version currently installed on this machine is adequate. 
    1: Event 'E544953' is created 
    1: Ev1996380 
    1: MsiServerStartup ends 
    Action ended 17:05:44: ISMsiServerStartup. Return value 0.
    Action ended 17:05:45: ISStartup. Return value 1.
    Action 17:05:45: NewCustomAction1. 
    Action start 17:05:45: NewCustomAction1.
    Action ended 17:05:45: NewCustomAction1. Return value 3.
    Action 17:05:45: ISCleanUpFatalExit. 
    Action start 17:05:45: ISCleanUpFatalExit.
    1: Shutting down the PRC server... 
    1: RPC server shut down. 
    Action ended 17:05:45: ISCleanUpFatalExit. Return value 1.
    Action ended 17:05:45: INSTALL. Return value 3.
    1: MsiServerStartup ends 
    Action ended 17:05:45: ISMsiServerStartup. Return value 0.
    Action ended 17:05:45: ExecuteAction. Return value 3.
    Action 17:05:45: SetupCompleteError. 
    Action start 17:05:45: SetupCompleteError.
    Action 17:05:45: SetupCompleteError. Dialog created
    Action 17:05:46: ISCleanUpFatalExit. 
    Action start 17:05:46: ISCleanUpFatalExit.
    Action ended 17:05:46: ISCleanUpFatalExit. Return value 1.
    Action ended 17:05:46: SetupCompleteError. Return value 2.
    Action ended 17:05:46: INSTALL. Return value 3.
    === Logging stopped: 2006-6-10  17:05:46 ===
    MSI (c) (10:A4) [17:05:46:265]: Product: TreeInstall -- Installation operation failed.--------
    这里是我的测试信息,这里只是说安装失败了,但没有说错误在哪里..................
      

  5.   

    晕,要倒我也不会给8分这样来倒,要倒到何年何月啊~真不知道删贴的人的脑子是什么构造的>_<
      

  6.   

    我粗略看了一下,主要是NewCustomAction1中执行的操作出问题了。应该就是你安装那个第三方组件的部分吧。由于那个组件本身就是一个.MSI的安装包,所以实际安装的时候应该是在另一个进程上面执行的吧。因此installshield的安装进程并不能成功截取由那个进程所抛出的错误信息。只从Return value 3知道那个操作失败了。而将整个安装过程视为失败处理并回滚。以上是我依据你所贴的资料推断出来的,如有错漏请见谅^_^
      

  7.   

    CSDN就这样的......
    你可以去投诉社区投诉
    不过我的经验是,小问题他会处理的.
      

  8.   

    LogWriteCustomString是写到哪个目录的哪个文件去了???
    http://community.csdn.net/Expert/topic/4813/4813519.xml?temp=.9319727
    http://community.csdn.net/Expert/TopicView.asp?id=4812745
    这个是目录相关的题目.