MSI中的安装和部署中的确认消息框 [英] confirmation message box in Setup and deployment in MSI

查看:71
本文介绍了MSI中的安装和部署中的确认消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我想在安装程序中显示确认消息框,


,例如安装时应该询问"Do你想安装数据库"是或否。


[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
$
     ;   公开覆盖无效安装(IDictionary stateSaver)

        {


//确认消息


}


我想在Install事件中显示消息。


为此,我尝试使用


if MessageBox .Show(" 要为
安装数据库 ?"


 
"确认"
MessageBoxButton
.YesNo)== MessageBoxResult 。是的)


{


   
//关闭窗口


}


其他


{


   
//不要关闭窗口


}


但它无法正常工作,所以我可以在安装过程中使用确认信息框。


谢谢


mahajan

解决方案


您可以使用自定义安装程序。请查看
here


Hi,

I want to display confirmation message box in Installer,

for e.g while installation it should ask "Do you want to install the database" Yes or No.

[System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand)]
        public override void Install(IDictionary stateSaver)
        {

// Confirmation message

}

I want to display message in Install event.

For this I have tried using

if (MessageBox.Show("Do you want to install the database?",

  "Confirmation", MessageBoxButton.YesNo) == MessageBoxResult.Yes)

{

    // Close the window

}

else

{

    // Do not close the window

}

But it wont work properly,so which way I can use confirmation message box during installation.

Thanks


mahajan

解决方案

Hi,

you can use a custom installer. check here


这篇关于MSI中的安装和部署中的确认消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆