Msi insaller passing paramenter from command prompt for Set Service Login

好久不见. 提交于 2019-12-01 13:46:05

Need to redesign Instalation using This http://www.codeproject.com/Articles/16767/How-to-Pass-Command-Line-Arguments-to-MSI-Installe aticle

I use additional for installer class logic:

public override void Install(IDictionary stateSaver)
    {
        if (!String.IsNullOrWhiteSpace(this.Context.Parameters["password"]))
        {
            this.QualsMetricsSchedulerServiceInstaller.Password = this.Context.Parameters["password"];
            this.QualsMetricsSchedulerServiceInstaller.Username = this.Context.Parameters["user"];
        }
        else
        {
            this.Context.Parameters.Remove("user");
            this.Context.Parameters.Remove("password");
            this.QualsMetricsSchedulerServiceInstaller.Password = null;
            this.QualsMetricsSchedulerServiceInstaller.Username = null;
        }
        base.Install(stateSaver);
    }

And CustomActionData: /USERNAME="[USERNAME]" /PASSWORD="[PASSWORD]" Now can install manualy and for silent instal use msiexec /i QualsScheduler.msi /qb username=.\Gavrishdv password=***

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!