zoukankan      html  css  js  c++  java
  • 安装包自定义操作参数传递

    首先 在安装包中先添加自定义操作  如添加(主输出来自MyInstaller)

    然后 右键“主输出来自MyInstaller”-属性

            设置CustomActionData属性

            如 /ProductCode=[ProductCode] /Solution="Solution1"

    最后 在MyInstaller(继承自System.Configuration.Install.Installer)中获取参数

        [RunInstaller(true)]
        public class MyInstaller : System.Configuration.Install.Installer

        {

            private void GetParams()
            {
                //获取从安装程序“自定义操作”的CustomActionData属性中传过来的参数
                string szProductCode = Context.Parameters["ProductCode"];//获得 产品编号
                string szSolution = Context.Parameters["Solution"]; //获得 "Solution1"

            }

        }

  • 相关阅读:
    Flesch Reading Ease (poj 3371)
    保留道路
    列车调度
    三角形
    高精度加法
    AC自动机(1)
    线段树
    并查集(3)
    并查集(2)
    并查集
  • 原文地址:https://www.cnblogs.com/djian/p/2043656.html
Copyright © 2011-2022 走看看