zoukankan      html  css  js  c++  java
  • 在安装包运行时指定Component的安装路径

    Basic MSI工程类型中如果实现动态指定安装路径的功能,下面介绍的方法也适用于InstallScript MSI工程。

    1. 在Setup Design中找到相对应的Component。

    2. 点击Destination的后侧的“...”按键。

    3. 在Browse for Directory对话框中,选中Destination Computer后点击鼠标右键选择“New Directory” ,默认会参数一个NEW_DIRECTORY1,点击OK。

    4. 在Property Manager中添加一个 NEW_DIRECTORY1属性。

    5. 在脚本中添加如下代码:

    export prototype SetRuntimeProperty(function SetRuntimeProperty(hMSI) 
        STRING szRuntimeDestination ;
        NUMBER nCnt;
    begin;  
        szRuntimeDestination C:\Kevin WanMsiSetProperty(hMSI,NEW_DIRECTORY1,szRuntimeDestination);

    6. 添加一个CA,与脚本函数SetRuntimeProperty绑定。

    7. 将CA插入到User Interface序列中,放到SetupInitialization之后,设置运行条件为:Not Installed。

    8. 编译,运行安装包。 

  • 相关阅读:
    一个很吊的swing循环生成窗口。
    hbase操作的问题
    hadoop+hbase
    linux故障救援
    管道命令xargs
    hadoop浅尝 hadoop与hbase交互
    linux源代码阅读笔记 free_page_tables()分析
    词法分析器flex的使用
    每天一个Linux命令(1): find
    梯度下降
  • 原文地址:https://www.cnblogs.com/wcadaydayup/p/5405366.html
Copyright © 2011-2022 走看看